haikuwebkit/Tools/TestWebKitAPI/Counters.h

103 lines
3.1 KiB
C
Raw Permalink Normal View History

/*
* Copyright (C) 2014 Igalia S.L.
* Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
#ifndef Counters_h
#define Counters_h
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part https://bugs.webkit.org/show_bug.cgi?id=200620 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Three patches including this one were originally one patch. I split it into three pieces to make roll-out easy. This part, we annotate classes / structs with WTF_MAKE_FAST_ALLOCATED and WTF_MAKE_STRUCT_FAST_ALLOCATED if they are allocated from std::make_unique. The second patch will switch `std::make_unique` to `WTF::makeUnique` and the third patch will insert a static_assert that makeUnique-allocated class T is FastMalloc-ed. One insight from this patch is that we tend to forget adding WTF_MAKE_STRUCT_FAST_ALLOCATED if it is just a data struct. * debugger/Debugger.h: * inspector/scripts/codegen/objc_generator_templates.py: * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/domain-availability.json-result: * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/generic/expected/enum-values.json-result: * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result: * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result: * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result: * inspector/scripts/tests/generic/expected/should-strip-comments.json-result: * inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result: * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result: * inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result: * inspector/scripts/tests/generic/expected/version.json-result: * inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: Source/WebCore: * Modules/encryptedmedia/legacy/LegacyCDM.h: (WebCore::LegacyCDM::keySystem const): Deleted. (WebCore::LegacyCDM::client const): Deleted. (WebCore::LegacyCDM::setClient): Deleted. * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h: * Modules/webaudio/AsyncAudioDecoder.h: (WebCore::AsyncAudioDecoder::DecodingTask::audioData): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate const): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::successCallback): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::errorCallback): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer): Deleted. * Modules/webauthn/AuthenticatorCoordinator.h: * Modules/webdatabase/SQLStatement.h: (WebCore::SQLStatement::hasStatementCallback const): Deleted. (WebCore::SQLStatement::hasStatementErrorCallback const): Deleted. * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: * Modules/webgpu/WHLSL/WHLSLResolvingType.h: * bindings/js/DOMPromiseProxy.h: * bindings/js/GCController.h: * bridge/jsc/BridgeJSC.h: * contentextensions/ContentExtensionsBackend.h: * dom/FullscreenManager.h: (WebCore::FullscreenManager::document): Deleted. (WebCore::FullscreenManager::document const): Deleted. (WebCore::FullscreenManager::topDocument const): Deleted. (WebCore::FullscreenManager::page const): Deleted. (WebCore::FullscreenManager::frame const): Deleted. (WebCore::FullscreenManager::documentElement const): Deleted. (WebCore::FullscreenManager::hasLivingRenderTree const): Deleted. (WebCore::FullscreenManager::pageCacheState const): Deleted. (WebCore::FullscreenManager::scheduleFullStyleRebuild): Deleted. (WebCore::FullscreenManager::fullscreenElement const): Deleted. (WebCore::FullscreenManager::isFullscreen const): Deleted. (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const): Deleted. (WebCore::FullscreenManager::currentFullscreenElement const): Deleted. * dom/Microtasks.h: (WebCore::MicrotaskQueue::vm const): Deleted. * editing/CompositeEditCommand.h: * editing/mac/AlternativeTextUIController.h: * html/HTMLMediaElement.h: * inspector/InspectorFrontendClientLocal.h: * inspector/agents/WebHeapAgent.cpp: * layout/displaytree/DisplayRun.h: * layout/inlineformatting/InlineItem.h: * layout/inlineformatting/InlineLine.h: * layout/tableformatting/TableGrid.h: * loader/FrameLoader.h: (WebCore::FrameLoader::frame const): Deleted. (WebCore::FrameLoader::policyChecker const): Deleted. (WebCore::FrameLoader::history const): Deleted. (WebCore::FrameLoader::notifier const): Deleted. (WebCore::FrameLoader::subframeLoader const): Deleted. (WebCore::FrameLoader::mixedContentChecker const): Deleted. (WebCore::FrameLoader::urlSelected): Deleted. (WebCore::FrameLoader::reload): Deleted. (WebCore::FrameLoader::requestedHistoryItem const): Deleted. (WebCore::FrameLoader::documentLoader const): Deleted. (WebCore::FrameLoader::policyDocumentLoader const): Deleted. (WebCore::FrameLoader::provisionalDocumentLoader const): Deleted. (WebCore::FrameLoader::state const): Deleted. (WebCore::FrameLoader::shouldReportResourceTimingToParentFrame const): Deleted. (WebCore::FrameLoader::client const): Deleted. (WebCore::FrameLoader::forceSandboxFlags): Deleted. (WebCore::FrameLoader::hasOpenedFrames const): Deleted. (WebCore::FrameLoader::setLoadsSynchronously): Deleted. (WebCore::FrameLoader::loadsSynchronously const): Deleted. (WebCore::FrameLoader::stateMachine): Deleted. (WebCore::FrameLoader::quickRedirectComing const): Deleted. (WebCore::FrameLoader::pageDismissalEventBeingDispatched const): Deleted. (WebCore::FrameLoader::previousURL const): Deleted. (WebCore::FrameLoader::setOverrideCachePolicyForTesting): Deleted. (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting): Deleted. (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting): Deleted. (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting): Deleted. (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL const): Deleted. (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Deleted. (WebCore::FrameLoader::isReloadingFromOrigin const): Deleted. (WebCore::FrameLoader::setAlwaysAllowLocalWebarchive): Deleted. (WebCore::FrameLoader::alwaysAllowLocalWebarchive const): Deleted. (WebCore::FrameLoader::loadWithDocumentLoader): Deleted. (WebCore::FrameLoader::loadWithNavigationAction): Deleted. (WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const): Deleted. * loader/NavigationDisabler.h: * loader/NavigationScheduler.h: * loader/cache/CachedResource.h: * loader/cache/CachedSVGDocumentReference.h: (WebCore::CachedSVGDocumentReference::loadRequested const): Deleted. (WebCore::CachedSVGDocumentReference::document): Deleted. * loader/ios/PreviewLoader.h: * page/CaptionUserPreferences.h: * page/PrewarmInformation.h: * page/ResizeObserver.h: * page/SuspendableTimer.h: * page/csp/ContentSecurityPolicyDirective.h: * page/ios/ContentChangeObserver.h: * page/ios/DOMTimerHoldingTank.h: * page/linux/ResourceUsageOverlayLinux.cpp: * page/mac/TextIndicatorWindow.h: * page/scrolling/ScrollSnapOffsetsInfo.h: * page/scrolling/ScrollingMomentumCalculator.h: * platform/CPUMonitor.h: * platform/FileMonitor.h: * platform/ScrollAnimation.h: * platform/SuddenTermination.h: * platform/audio/AudioBus.h: (WebCore::AudioBus::numberOfChannels const): Deleted. (WebCore::AudioBus::channel): Deleted. (WebCore::AudioBus::channel const): Deleted. (WebCore::AudioBus::length const): Deleted. (WebCore::AudioBus::sampleRate const): Deleted. (WebCore::AudioBus::setSampleRate): Deleted. (WebCore::AudioBus::reset): Deleted. (WebCore::AudioBus::AudioBus): Deleted. * platform/audio/AudioChannel.h: (WebCore::AudioChannel::AudioChannel): Deleted. (WebCore::AudioChannel::set): Deleted. (WebCore::AudioChannel::length const): Deleted. (WebCore::AudioChannel::mutableData): Deleted. (WebCore::AudioChannel::data const): Deleted. (WebCore::AudioChannel::zero): Deleted. (WebCore::AudioChannel::clearSilentFlag): Deleted. (WebCore::AudioChannel::isSilent const): Deleted. * platform/audio/AudioFIFO.h: (WebCore::AudioFIFO::framesInFifo const): Deleted. (WebCore::AudioFIFO::updateIndex): Deleted. * platform/audio/AudioPullFIFO.h: * platform/audio/AudioResampler.h: (WebCore::AudioResampler::rate const): Deleted. * platform/audio/AudioResamplerKernel.h: * platform/audio/AudioSession.cpp: * platform/audio/AudioSession.h: (WebCore::AudioSession::isActive const): Deleted. * platform/audio/Biquad.h: * platform/audio/Cone.h: (WebCore::ConeEffect::setInnerAngle): Deleted. (WebCore::ConeEffect::innerAngle const): Deleted. (WebCore::ConeEffect::setOuterAngle): Deleted. (WebCore::ConeEffect::outerAngle const): Deleted. (WebCore::ConeEffect::setOuterGain): Deleted. (WebCore::ConeEffect::outerGain const): Deleted. * platform/audio/DenormalDisabler.h: (WebCore::DenormalDisabler::DenormalDisabler): Deleted. (WebCore::DenormalDisabler::~DenormalDisabler): Deleted. (WebCore::DenormalDisabler::flushDenormalFloatToZero): Deleted. (WebCore::DenormalDisabler::getCSR): Deleted. (WebCore::DenormalDisabler::setCSR): Deleted. * platform/audio/DirectConvolver.h: * platform/audio/Distance.h: (WebCore::DistanceEffect::model): Deleted. (WebCore::DistanceEffect::setModel): Deleted. (WebCore::DistanceEffect::setRefDistance): Deleted. (WebCore::DistanceEffect::setMaxDistance): Deleted. (WebCore::DistanceEffect::setRolloffFactor): Deleted. (WebCore::DistanceEffect::refDistance const): Deleted. (WebCore::DistanceEffect::maxDistance const): Deleted. (WebCore::DistanceEffect::rolloffFactor const): Deleted. * platform/audio/DownSampler.h: * platform/audio/DynamicsCompressor.h: (WebCore::DynamicsCompressor::sampleRate const): Deleted. (WebCore::DynamicsCompressor::nyquist const): Deleted. (WebCore::DynamicsCompressor::tailTime const): Deleted. (WebCore::DynamicsCompressor::latencyTime const): Deleted. * platform/audio/DynamicsCompressorKernel.h: (WebCore::DynamicsCompressorKernel::latencyFrames const): Deleted. (WebCore::DynamicsCompressorKernel::sampleRate const): Deleted. (WebCore::DynamicsCompressorKernel::meteringGain const): Deleted. * platform/audio/EqualPowerPanner.h: * platform/audio/FFTConvolver.h: (WebCore::FFTConvolver::fftSize const): Deleted. * platform/audio/HRTFDatabase.h: (WebCore::HRTFDatabase::numberOfAzimuths): Deleted. (WebCore::HRTFDatabase::sampleRate const): Deleted. * platform/audio/HRTFElevation.h: (WebCore::HRTFElevation::HRTFElevation): Deleted. (WebCore::HRTFElevation::kernelListL): Deleted. (WebCore::HRTFElevation::kernelListR): Deleted. (WebCore::HRTFElevation::elevationAngle const): Deleted. (WebCore::HRTFElevation::numberOfAzimuths const): Deleted. (WebCore::HRTFElevation::sampleRate const): Deleted. * platform/audio/HRTFPanner.h: (WebCore::HRTFPanner::fftSize const): Deleted. (WebCore::HRTFPanner::sampleRate const): Deleted. * platform/audio/MultiChannelResampler.h: * platform/audio/PlatformAudioData.h: * platform/audio/Reverb.h: (WebCore::Reverb::impulseResponseLength const): Deleted. * platform/audio/ReverbAccumulationBuffer.h: (WebCore::ReverbAccumulationBuffer::readIndex const): Deleted. (WebCore::ReverbAccumulationBuffer::readTimeFrame const): Deleted. * platform/audio/ReverbConvolver.h: (WebCore::ReverbConvolver::impulseResponseLength const): Deleted. (WebCore::ReverbConvolver::inputBuffer): Deleted. (WebCore::ReverbConvolver::useBackgroundThreads const): Deleted. * platform/audio/ReverbConvolverStage.h: (WebCore::ReverbConvolverStage::inputReadIndex const): Deleted. * platform/audio/ReverbInputBuffer.h: (WebCore::ReverbInputBuffer::writeIndex const): Deleted. * platform/audio/SincResampler.h: * platform/audio/UpSampler.h: * platform/audio/ZeroPole.h: (WebCore::ZeroPole::ZeroPole): Deleted. (WebCore::ZeroPole::reset): Deleted. (WebCore::ZeroPole::setZero): Deleted. (WebCore::ZeroPole::setPole): Deleted. (WebCore::ZeroPole::zero const): Deleted. (WebCore::ZeroPole::pole const): Deleted. * platform/audio/cocoa/WebAudioBufferList.h: (WebCore::WebAudioBufferList::list const): Deleted. (WebCore::WebAudioBufferList::operator AudioBufferList& const): Deleted. (WebCore::WebAudioBufferList::kind const): Deleted. * platform/audio/ios/AudioSessionIOS.mm: * platform/audio/mac/CARingBuffer.h: * platform/encryptedmedia/clearkey/CDMClearKey.h: * platform/gamepad/mac/HIDGamepad.h: * platform/graphics/FloatPoint.h: * platform/graphics/Font.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3DPrivate.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/GraphicsLayer.cpp: * platform/graphics/LegacyCDMSession.h: * platform/graphics/Region.h: * platform/graphics/VelocityData.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: * platform/graphics/avfoundation/CDMFairPlayStreaming.h: * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/cairo/FontCustomPlatformData.h: * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cairo/PlatformContextCairo.h: * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: * platform/graphics/cv/ImageRotationSessionVT.h: (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const): Deleted. (WebCore::ImageRotationSessionVT::transform const): Deleted. (WebCore::ImageRotationSessionVT::rotationProperties const): Deleted. (WebCore::ImageRotationSessionVT::size): Deleted. (WebCore::ImageRotationSessionVT::rotatedSize): Deleted. * platform/graphics/cv/PixelBufferConformerCV.h: * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: * platform/graphics/iso/ISOBox.h: * platform/graphics/iso/ISOOriginalFormatBox.h: * platform/graphics/iso/ISOProtectionSchemeInfoBox.h: * platform/graphics/iso/ISOSchemeInformationBox.h: * platform/graphics/iso/ISOSchemeTypeBox.h: * platform/graphics/iso/ISOTrackEncryptionBox.h: * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOStringBox::contents): Deleted. * platform/graphics/iso/ISOVTTCue.h: (WebCore::ISOWebVTTCue::boxTypeName): Deleted. (WebCore::ISOWebVTTCue::presentationTime const): Deleted. (WebCore::ISOWebVTTCue::duration const): Deleted. (WebCore::ISOWebVTTCue::sourceID const): Deleted. (WebCore::ISOWebVTTCue::id const): Deleted. (WebCore::ISOWebVTTCue::originalStartTime const): Deleted. (WebCore::ISOWebVTTCue::settings const): Deleted. (WebCore::ISOWebVTTCue::cueText const): Deleted. * platform/graphics/nicosia/NicosiaPaintingOperation.h: * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h: * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h: * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h: * platform/graphics/opengl/Extensions3DOpenGLCommon.h: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/coordinated/Tile.h: * platform/graphics/win/FontCustomPlatformData.h: * platform/graphics/win/FullScreenController.cpp: * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: * platform/graphics/win/PlatformContextDirect2D.h: * platform/graphics/win/WKCAImageQueue.cpp: * platform/gtk/PasteboardHelper.cpp: * platform/ios/LegacyTileGrid.h: * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: * platform/mediastream/gstreamer/GStreamerAudioData.h: (WebCore::GStreamerAudioData::GStreamerAudioData): Deleted. (WebCore::GStreamerAudioData::getSample): Deleted. (WebCore::GStreamerAudioData::getAudioInfo): Deleted. (WebCore::GStreamerAudioData::kind const): Deleted. * platform/mediastream/gstreamer/GStreamerCapturer.h: * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.h: * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h: * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h: * platform/mock/MediaPlaybackTargetPickerMock.h: * platform/mock/RTCDataChannelHandlerMock.h: * platform/network/ResourceErrorBase.h: * platform/network/curl/CookieJarDB.h: * platform/network/curl/CurlCacheEntry.h: * platform/network/curl/CurlContext.h: * platform/network/curl/CurlMultipartHandle.h: * platform/network/curl/CurlRequestScheduler.h: * platform/network/curl/CurlSSLVerifier.h: * platform/network/ios/PreviewConverter.h: * platform/network/soup/NetworkStorageSessionSoup.cpp: * platform/vr/openvr/VRPlatformDisplayOpenVR.h: * platform/vr/openvr/VRPlatformManagerOpenVR.h: * rendering/HitTestResult.h: * rendering/LayerOverlapMap.cpp: * rendering/RenderLayerCompositor.h: * rendering/svg/RenderSVGResourceMasker.h: * replay/UserInputBridge.h: * svg/graphics/filters/SVGFilterBuilder.h: * svg/properties/SVGAttributeAnimator.h: * svg/properties/SVGDecoratedProperty.h: * svg/properties/SVGPropertyAnimatorFactory.h: * testing/InternalSettings.cpp: * testing/LegacyMockCDM.cpp: * testing/LegacyMockCDM.h: * testing/MockCDMFactory.h: * workers/WorkerEventQueue.cpp: * workers/WorkerEventQueue.h: * workers/service/ServiceWorkerContainer.h: * worklets/PaintWorkletGlobalScope.h: * xml/XMLErrors.h: * xml/parser/XMLDocumentParserLibxml2.cpp: Source/WebDriver: * glib/SessionHostGlib.cpp: Source/WebKit: * NetworkProcess/AdClickAttributionManager.h: * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: * NetworkProcess/Cookies/WebCookieManager.h: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/NetworkHTTPSUpgradeChecker.h: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkSession.h: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/WebSocketTask.h: * NetworkProcess/cache/PrefetchCache.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.h: * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: * NetworkProcess/soup/WebSocketTaskSoup.h: * NetworkProcess/webrtc/LibWebRTCSocketClient.h: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * Platform/Module.h: * PluginProcess/PluginControllerProxy.h: * Shared/ApplePay/WebPaymentCoordinatorProxy.h: * Shared/Authentication/AuthenticationManager.h: * Shared/Cocoa/SandboxExtensionCocoa.mm: * Shared/Plugins/NPObjectMessageReceiver.h: * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: * UIProcess/API/APIAutomationClient.h: * UIProcess/API/APIAutomationSessionClient.h: * UIProcess/API/APIContextMenuClient.h: * UIProcess/API/APICustomProtocolManagerClient.h: * UIProcess/API/APIDiagnosticLoggingClient.h: * UIProcess/API/APIDownloadClient.h: * UIProcess/API/APIFindClient.h: * UIProcess/API/APIFindMatchesClient.h: * UIProcess/API/APIFormClient.h: * UIProcess/API/APIFullscreenClient.h: * UIProcess/API/APIGeolocationProvider.h: * UIProcess/API/APIHistoryClient.h: * UIProcess/API/APIIconDatabaseClient.h: * UIProcess/API/APIIconLoadingClient.h: * UIProcess/API/APIInjectedBundleClient.h: * UIProcess/API/APILegacyContextHistoryClient.h: * UIProcess/API/APILoaderClient.h: * UIProcess/API/APINavigationClient.h: * UIProcess/API/APIPolicyClient.h: * UIProcess/API/APIUIClient.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetPageStateClient): * UIProcess/API/Cocoa/WKUserContentController.mm: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: * UIProcess/API/glib/IconDatabase.h: * UIProcess/API/glib/WebKitAutomationSession.cpp: * UIProcess/API/glib/WebKitIconLoadingClient.cpp: * UIProcess/API/glib/WebKitNotificationProvider.h: * UIProcess/API/glib/WebKitUserContentManager.cpp: * UIProcess/API/glib/WebKitWebContext.cpp: * UIProcess/API/glib/WebKitWebView.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/API/gtk/WebKitWebInspector.cpp: * UIProcess/API/mac/WKView.mm: (-[WKView maybeInstallIconLoadingClient]): * UIProcess/API/wpe/APIViewClient.h: * UIProcess/API/wpe/ScrollGestureController.h: * UIProcess/ApplicationStateTracker.h: * UIProcess/Cocoa/AutomationSessionClient.h: * UIProcess/Cocoa/IconLoadingDelegate.h: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h: * UIProcess/DrawingAreaProxy.h: * UIProcess/HighPerformanceGraphicsUsageSampler.h: * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/PageClient.h: * UIProcess/PerActivityStateCPUUsageSampler.h: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.h: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: * UIProcess/SystemPreviewController.h: * UIProcess/UserMediaPermissionRequestManagerProxy.h: * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h: * UIProcess/WebNavigationState.h: * UIProcess/WebPageInjectedBundleClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebsiteData/WebsiteDataStoreClient.h: * UIProcess/gtk/DragAndDropHandler.h: * UIProcess/ios/EditableImageController.h: * UIProcess/ios/InputViewUpdateDeferrer.h: * UIProcess/ios/SmartMagnificationController.h: * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: * UIProcess/mac/WKFullScreenWindowController.mm: * UIProcess/mac/WKTextFinderClient.mm: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: * WebProcess/Geolocation/WebGeolocationManager.h: * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: * WebProcess/MediaCache/WebMediaKeyStorageManager.h: * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: * WebProcess/Network/webrtc/LibWebRTCResolver.h: * WebProcess/Notifications/WebNotificationManager.h: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h: * WebProcess/Plugins/PluginController.h: * WebProcess/Storage/WebSWOriginTable.h: * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebContextMenuClient.h: * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/WebGeolocationClient.h: * WebProcess/WebCoreSupport/WebInspectorClient.h: * WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h: * WebProcess/WebCoreSupport/WebNotificationClient.h: * WebProcess/WebCoreSupport/WebPlugInClient.h: * WebProcess/WebCoreSupport/WebProgressTrackerClient.h: * WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h: * WebProcess/WebCoreSupport/WebUserMediaClient.h: * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h: * WebProcess/WebPage/FindController.h: * WebProcess/WebPage/ViewGestureGeometryCollector.h: * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h: * WebProcess/WebProcess.h: * WebProcess/cocoa/UserMediaCaptureManager.h: Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: * WebCoreSupport/WebFixedPositionContent.mm: Source/WebKitLegacy/mac: * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/WebHostedNetscapePluginView.mm: * Plugins/WebNetscapePluginEventHandlerCocoa.h: * Storage/WebDatabaseManagerClient.mm: * WebCoreSupport/WebAlternativeTextClient.h: * WebCoreSupport/WebCachedFramePlatformData.h: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebContextMenuClient.h: * WebCoreSupport/WebDragClient.h: * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebGeolocationClient.h: * WebCoreSupport/WebInspectorClient.h: * WebCoreSupport/WebNotificationClient.h: * WebCoreSupport/WebSelectionServiceController.h: * WebView/WebMediaPlaybackTargetPicker.h: Source/WebKitLegacy/win: * FullscreenVideoController.cpp: * FullscreenVideoController.h: * Plugins/PluginMessageThrottlerWin.h: * WebCachedFramePlatformData.h: * WebCoreSupport/AcceleratedCompositingContext.h: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebContextMenuClient.h: * WebCoreSupport/WebDesktopNotificationsDelegate.h: * WebCoreSupport/WebDragClient.h: * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebFrameLoaderClient.cpp: * WebCoreSupport/WebGeolocationClient.h: * WebCoreSupport/WebInspectorClient.h: * WebDatabaseManager.cpp: * WebKitQuartzCoreAdditions/CAD3DRenderer.h: * WebNodeHighlight.h: * WebNotificationCenter.cpp: * WebNotificationCenter.h: Tools: * DumpRenderTree/AccessibilityController.h: * DumpRenderTree/GCController.h: * DumpRenderTree/win/DRTDataObject.cpp: * DumpRenderTree/win/DRTDataObject.h: * DumpRenderTree/win/DRTDesktopNotificationPresenter.h: * DumpRenderTree/win/DRTDropSource.h: * DumpRenderTree/win/DraggingInfo.h: * DumpRenderTree/win/EditingDelegate.h: * DumpRenderTree/win/EventSender.cpp: * DumpRenderTree/win/FrameLoadDelegate.h: * DumpRenderTree/win/HistoryDelegate.h: * DumpRenderTree/win/MD5.h: * DumpRenderTree/win/PolicyDelegate.h: * DumpRenderTree/win/ResourceLoadDelegate.h: * DumpRenderTree/win/TextInputController.h: * DumpRenderTree/win/UIDelegate.cpp: * DumpRenderTree/win/UIDelegate.h: * TestRunnerShared/UIScriptContext/UIScriptContext.h: * TestRunnerShared/cocoa/ClassMethodSwizzler.h: * TestRunnerShared/cocoa/InstanceMethodSwizzler.h: * TestWebKitAPI/Counters.h: * TestWebKitAPI/PlatformWebView.h: * TestWebKitAPI/Tests/WTF/Expected.cpp: * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::DerefObserver::ref): (TestWebKitAPI::DerefObserver::deref): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::DerefObserver::ref): (TestWebKitAPI::DerefObserver::deref): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/UniqueRef.cpp: * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.h: * TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h: * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/GeolocationProviderMock.h: * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/TestInvocation.h: Canonical link: https://commits.webkit.org/214537@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-16 06:53:36 +00:00
#include <wtf/FastMalloc.h>
struct CopyMoveCounter {
static unsigned constructionCount;
static unsigned copyCount;
static unsigned moveCount;
struct TestingScope {
TestingScope()
{
constructionCount = 0;
copyCount = 0;
moveCount = 0;
}
};
CopyMoveCounter() { constructionCount++; }
CopyMoveCounter(const CopyMoveCounter&) { copyCount++; }
CopyMoveCounter& operator=(const CopyMoveCounter&) { copyCount++; return *this; }
CopyMoveCounter(CopyMoveCounter&&) { moveCount++; }
CopyMoveCounter& operator=(CopyMoveCounter&&) { moveCount++; return *this; }
};
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
struct ConstructorDestructorCounter {
[WTF] Add makeUnique<T>, which ensures T is fast-allocated, WTF_MAKE_FAST_ALLOCATED annotation part https://bugs.webkit.org/show_bug.cgi?id=200620 Reviewed by Geoffrey Garen. Source/JavaScriptCore: Three patches including this one were originally one patch. I split it into three pieces to make roll-out easy. This part, we annotate classes / structs with WTF_MAKE_FAST_ALLOCATED and WTF_MAKE_STRUCT_FAST_ALLOCATED if they are allocated from std::make_unique. The second patch will switch `std::make_unique` to `WTF::makeUnique` and the third patch will insert a static_assert that makeUnique-allocated class T is FastMalloc-ed. One insight from this patch is that we tend to forget adding WTF_MAKE_STRUCT_FAST_ALLOCATED if it is just a data struct. * debugger/Debugger.h: * inspector/scripts/codegen/objc_generator_templates.py: * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result: * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result: * inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/generic/expected/domain-availability.json-result: * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result: * inspector/scripts/tests/generic/expected/enum-values.json-result: * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result: * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result: * inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result: * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result: * inspector/scripts/tests/generic/expected/should-strip-comments.json-result: * inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result: * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result: * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result: * inspector/scripts/tests/generic/expected/type-with-open-parameters.json-result: * inspector/scripts/tests/generic/expected/version.json-result: * inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result: * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result: Source/WebCore: * Modules/encryptedmedia/legacy/LegacyCDM.h: (WebCore::LegacyCDM::keySystem const): Deleted. (WebCore::LegacyCDM::client const): Deleted. (WebCore::LegacyCDM::setClient): Deleted. * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h: * Modules/webaudio/AsyncAudioDecoder.h: (WebCore::AsyncAudioDecoder::DecodingTask::audioData): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::sampleRate const): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::successCallback): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::errorCallback): Deleted. (WebCore::AsyncAudioDecoder::DecodingTask::audioBuffer): Deleted. * Modules/webauthn/AuthenticatorCoordinator.h: * Modules/webdatabase/SQLStatement.h: (WebCore::SQLStatement::hasStatementCallback const): Deleted. (WebCore::SQLStatement::hasStatementErrorCallback const): Deleted. * Modules/webgpu/WHLSL/AST/WHLSLVariableDeclaration.h: * Modules/webgpu/WHLSL/Metal/WHLSLEntryPointScaffolding.h: * Modules/webgpu/WHLSL/WHLSLResolvingType.h: * bindings/js/DOMPromiseProxy.h: * bindings/js/GCController.h: * bridge/jsc/BridgeJSC.h: * contentextensions/ContentExtensionsBackend.h: * dom/FullscreenManager.h: (WebCore::FullscreenManager::document): Deleted. (WebCore::FullscreenManager::document const): Deleted. (WebCore::FullscreenManager::topDocument const): Deleted. (WebCore::FullscreenManager::page const): Deleted. (WebCore::FullscreenManager::frame const): Deleted. (WebCore::FullscreenManager::documentElement const): Deleted. (WebCore::FullscreenManager::hasLivingRenderTree const): Deleted. (WebCore::FullscreenManager::pageCacheState const): Deleted. (WebCore::FullscreenManager::scheduleFullStyleRebuild): Deleted. (WebCore::FullscreenManager::fullscreenElement const): Deleted. (WebCore::FullscreenManager::isFullscreen const): Deleted. (WebCore::FullscreenManager::isFullscreenKeyboardInputAllowed const): Deleted. (WebCore::FullscreenManager::currentFullscreenElement const): Deleted. * dom/Microtasks.h: (WebCore::MicrotaskQueue::vm const): Deleted. * editing/CompositeEditCommand.h: * editing/mac/AlternativeTextUIController.h: * html/HTMLMediaElement.h: * inspector/InspectorFrontendClientLocal.h: * inspector/agents/WebHeapAgent.cpp: * layout/displaytree/DisplayRun.h: * layout/inlineformatting/InlineItem.h: * layout/inlineformatting/InlineLine.h: * layout/tableformatting/TableGrid.h: * loader/FrameLoader.h: (WebCore::FrameLoader::frame const): Deleted. (WebCore::FrameLoader::policyChecker const): Deleted. (WebCore::FrameLoader::history const): Deleted. (WebCore::FrameLoader::notifier const): Deleted. (WebCore::FrameLoader::subframeLoader const): Deleted. (WebCore::FrameLoader::mixedContentChecker const): Deleted. (WebCore::FrameLoader::urlSelected): Deleted. (WebCore::FrameLoader::reload): Deleted. (WebCore::FrameLoader::requestedHistoryItem const): Deleted. (WebCore::FrameLoader::documentLoader const): Deleted. (WebCore::FrameLoader::policyDocumentLoader const): Deleted. (WebCore::FrameLoader::provisionalDocumentLoader const): Deleted. (WebCore::FrameLoader::state const): Deleted. (WebCore::FrameLoader::shouldReportResourceTimingToParentFrame const): Deleted. (WebCore::FrameLoader::client const): Deleted. (WebCore::FrameLoader::forceSandboxFlags): Deleted. (WebCore::FrameLoader::hasOpenedFrames const): Deleted. (WebCore::FrameLoader::setLoadsSynchronously): Deleted. (WebCore::FrameLoader::loadsSynchronously const): Deleted. (WebCore::FrameLoader::stateMachine): Deleted. (WebCore::FrameLoader::quickRedirectComing const): Deleted. (WebCore::FrameLoader::pageDismissalEventBeingDispatched const): Deleted. (WebCore::FrameLoader::previousURL const): Deleted. (WebCore::FrameLoader::setOverrideCachePolicyForTesting): Deleted. (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting): Deleted. (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting): Deleted. (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting): Deleted. (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL const): Deleted. (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Deleted. (WebCore::FrameLoader::isReloadingFromOrigin const): Deleted. (WebCore::FrameLoader::setAlwaysAllowLocalWebarchive): Deleted. (WebCore::FrameLoader::alwaysAllowLocalWebarchive const): Deleted. (WebCore::FrameLoader::loadWithDocumentLoader): Deleted. (WebCore::FrameLoader::loadWithNavigationAction): Deleted. (WebCore::FrameLoader::shouldTreatCurrentLoadAsContinuingLoad const): Deleted. * loader/NavigationDisabler.h: * loader/NavigationScheduler.h: * loader/cache/CachedResource.h: * loader/cache/CachedSVGDocumentReference.h: (WebCore::CachedSVGDocumentReference::loadRequested const): Deleted. (WebCore::CachedSVGDocumentReference::document): Deleted. * loader/ios/PreviewLoader.h: * page/CaptionUserPreferences.h: * page/PrewarmInformation.h: * page/ResizeObserver.h: * page/SuspendableTimer.h: * page/csp/ContentSecurityPolicyDirective.h: * page/ios/ContentChangeObserver.h: * page/ios/DOMTimerHoldingTank.h: * page/linux/ResourceUsageOverlayLinux.cpp: * page/mac/TextIndicatorWindow.h: * page/scrolling/ScrollSnapOffsetsInfo.h: * page/scrolling/ScrollingMomentumCalculator.h: * platform/CPUMonitor.h: * platform/FileMonitor.h: * platform/ScrollAnimation.h: * platform/SuddenTermination.h: * platform/audio/AudioBus.h: (WebCore::AudioBus::numberOfChannels const): Deleted. (WebCore::AudioBus::channel): Deleted. (WebCore::AudioBus::channel const): Deleted. (WebCore::AudioBus::length const): Deleted. (WebCore::AudioBus::sampleRate const): Deleted. (WebCore::AudioBus::setSampleRate): Deleted. (WebCore::AudioBus::reset): Deleted. (WebCore::AudioBus::AudioBus): Deleted. * platform/audio/AudioChannel.h: (WebCore::AudioChannel::AudioChannel): Deleted. (WebCore::AudioChannel::set): Deleted. (WebCore::AudioChannel::length const): Deleted. (WebCore::AudioChannel::mutableData): Deleted. (WebCore::AudioChannel::data const): Deleted. (WebCore::AudioChannel::zero): Deleted. (WebCore::AudioChannel::clearSilentFlag): Deleted. (WebCore::AudioChannel::isSilent const): Deleted. * platform/audio/AudioFIFO.h: (WebCore::AudioFIFO::framesInFifo const): Deleted. (WebCore::AudioFIFO::updateIndex): Deleted. * platform/audio/AudioPullFIFO.h: * platform/audio/AudioResampler.h: (WebCore::AudioResampler::rate const): Deleted. * platform/audio/AudioResamplerKernel.h: * platform/audio/AudioSession.cpp: * platform/audio/AudioSession.h: (WebCore::AudioSession::isActive const): Deleted. * platform/audio/Biquad.h: * platform/audio/Cone.h: (WebCore::ConeEffect::setInnerAngle): Deleted. (WebCore::ConeEffect::innerAngle const): Deleted. (WebCore::ConeEffect::setOuterAngle): Deleted. (WebCore::ConeEffect::outerAngle const): Deleted. (WebCore::ConeEffect::setOuterGain): Deleted. (WebCore::ConeEffect::outerGain const): Deleted. * platform/audio/DenormalDisabler.h: (WebCore::DenormalDisabler::DenormalDisabler): Deleted. (WebCore::DenormalDisabler::~DenormalDisabler): Deleted. (WebCore::DenormalDisabler::flushDenormalFloatToZero): Deleted. (WebCore::DenormalDisabler::getCSR): Deleted. (WebCore::DenormalDisabler::setCSR): Deleted. * platform/audio/DirectConvolver.h: * platform/audio/Distance.h: (WebCore::DistanceEffect::model): Deleted. (WebCore::DistanceEffect::setModel): Deleted. (WebCore::DistanceEffect::setRefDistance): Deleted. (WebCore::DistanceEffect::setMaxDistance): Deleted. (WebCore::DistanceEffect::setRolloffFactor): Deleted. (WebCore::DistanceEffect::refDistance const): Deleted. (WebCore::DistanceEffect::maxDistance const): Deleted. (WebCore::DistanceEffect::rolloffFactor const): Deleted. * platform/audio/DownSampler.h: * platform/audio/DynamicsCompressor.h: (WebCore::DynamicsCompressor::sampleRate const): Deleted. (WebCore::DynamicsCompressor::nyquist const): Deleted. (WebCore::DynamicsCompressor::tailTime const): Deleted. (WebCore::DynamicsCompressor::latencyTime const): Deleted. * platform/audio/DynamicsCompressorKernel.h: (WebCore::DynamicsCompressorKernel::latencyFrames const): Deleted. (WebCore::DynamicsCompressorKernel::sampleRate const): Deleted. (WebCore::DynamicsCompressorKernel::meteringGain const): Deleted. * platform/audio/EqualPowerPanner.h: * platform/audio/FFTConvolver.h: (WebCore::FFTConvolver::fftSize const): Deleted. * platform/audio/HRTFDatabase.h: (WebCore::HRTFDatabase::numberOfAzimuths): Deleted. (WebCore::HRTFDatabase::sampleRate const): Deleted. * platform/audio/HRTFElevation.h: (WebCore::HRTFElevation::HRTFElevation): Deleted. (WebCore::HRTFElevation::kernelListL): Deleted. (WebCore::HRTFElevation::kernelListR): Deleted. (WebCore::HRTFElevation::elevationAngle const): Deleted. (WebCore::HRTFElevation::numberOfAzimuths const): Deleted. (WebCore::HRTFElevation::sampleRate const): Deleted. * platform/audio/HRTFPanner.h: (WebCore::HRTFPanner::fftSize const): Deleted. (WebCore::HRTFPanner::sampleRate const): Deleted. * platform/audio/MultiChannelResampler.h: * platform/audio/PlatformAudioData.h: * platform/audio/Reverb.h: (WebCore::Reverb::impulseResponseLength const): Deleted. * platform/audio/ReverbAccumulationBuffer.h: (WebCore::ReverbAccumulationBuffer::readIndex const): Deleted. (WebCore::ReverbAccumulationBuffer::readTimeFrame const): Deleted. * platform/audio/ReverbConvolver.h: (WebCore::ReverbConvolver::impulseResponseLength const): Deleted. (WebCore::ReverbConvolver::inputBuffer): Deleted. (WebCore::ReverbConvolver::useBackgroundThreads const): Deleted. * platform/audio/ReverbConvolverStage.h: (WebCore::ReverbConvolverStage::inputReadIndex const): Deleted. * platform/audio/ReverbInputBuffer.h: (WebCore::ReverbInputBuffer::writeIndex const): Deleted. * platform/audio/SincResampler.h: * platform/audio/UpSampler.h: * platform/audio/ZeroPole.h: (WebCore::ZeroPole::ZeroPole): Deleted. (WebCore::ZeroPole::reset): Deleted. (WebCore::ZeroPole::setZero): Deleted. (WebCore::ZeroPole::setPole): Deleted. (WebCore::ZeroPole::zero const): Deleted. (WebCore::ZeroPole::pole const): Deleted. * platform/audio/cocoa/WebAudioBufferList.h: (WebCore::WebAudioBufferList::list const): Deleted. (WebCore::WebAudioBufferList::operator AudioBufferList& const): Deleted. (WebCore::WebAudioBufferList::kind const): Deleted. * platform/audio/ios/AudioSessionIOS.mm: * platform/audio/mac/CARingBuffer.h: * platform/encryptedmedia/clearkey/CDMClearKey.h: * platform/gamepad/mac/HIDGamepad.h: * platform/graphics/FloatPoint.h: * platform/graphics/Font.h: * platform/graphics/GraphicsContext.h: * platform/graphics/GraphicsContext3DPrivate.h: * platform/graphics/GraphicsContextImpl.h: * platform/graphics/GraphicsLayer.cpp: * platform/graphics/LegacyCDMSession.h: * platform/graphics/Region.h: * platform/graphics/VelocityData.h: * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: * platform/graphics/avfoundation/CDMFairPlayStreaming.h: * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h: * platform/graphics/avfoundation/ISOFairPlayStreamingPsshBox.h: * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp: * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: * platform/graphics/ca/GraphicsLayerCA.h: * platform/graphics/cairo/FontCustomPlatformData.h: * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: * platform/graphics/cairo/PlatformContextCairo.h: * platform/graphics/cocoa/GraphicsContext3DCocoa.mm: * platform/graphics/cv/ImageRotationSessionVT.h: (WebCore::ImageRotationSessionVT::RotationProperties::isIdentity const): Deleted. (WebCore::ImageRotationSessionVT::transform const): Deleted. (WebCore::ImageRotationSessionVT::rotationProperties const): Deleted. (WebCore::ImageRotationSessionVT::size): Deleted. (WebCore::ImageRotationSessionVT::rotatedSize): Deleted. * platform/graphics/cv/PixelBufferConformerCV.h: * platform/graphics/cv/TextureCacheCV.h: * platform/graphics/cv/VideoTextureCopierCV.h: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: * platform/graphics/gstreamer/VideoTextureCopierGStreamer.h: * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp: * platform/graphics/holepunch/MediaPlayerPrivateHolePunch.h: * platform/graphics/iso/ISOBox.h: * platform/graphics/iso/ISOOriginalFormatBox.h: * platform/graphics/iso/ISOProtectionSchemeInfoBox.h: * platform/graphics/iso/ISOSchemeInformationBox.h: * platform/graphics/iso/ISOSchemeTypeBox.h: * platform/graphics/iso/ISOTrackEncryptionBox.h: * platform/graphics/iso/ISOVTTCue.cpp: (WebCore::ISOStringBox::contents): Deleted. * platform/graphics/iso/ISOVTTCue.h: (WebCore::ISOWebVTTCue::boxTypeName): Deleted. (WebCore::ISOWebVTTCue::presentationTime const): Deleted. (WebCore::ISOWebVTTCue::duration const): Deleted. (WebCore::ISOWebVTTCue::sourceID const): Deleted. (WebCore::ISOWebVTTCue::id const): Deleted. (WebCore::ISOWebVTTCue::originalStartTime const): Deleted. (WebCore::ISOWebVTTCue::settings const): Deleted. (WebCore::ISOWebVTTCue::cueText const): Deleted. * platform/graphics/nicosia/NicosiaPaintingOperation.h: * platform/graphics/nicosia/texmap/NicosiaBackingStoreTextureMapperImpl.h: * platform/graphics/nicosia/texmap/NicosiaCompositionLayerTextureMapperImpl.h: * platform/graphics/nicosia/texmap/NicosiaContentLayerTextureMapperImpl.h: * platform/graphics/nicosia/texmap/NicosiaGC3DLayer.h: * platform/graphics/nicosia/texmap/NicosiaImageBackingTextureMapperImpl.h: * platform/graphics/opengl/Extensions3DOpenGLCommon.h: * platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h: * platform/graphics/texmap/coordinated/Tile.h: * platform/graphics/win/FontCustomPlatformData.h: * platform/graphics/win/FullScreenController.cpp: * platform/graphics/win/MediaPlayerPrivateFullscreenWindow.h: * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h: * platform/graphics/win/PlatformContextDirect2D.h: * platform/graphics/win/WKCAImageQueue.cpp: * platform/gtk/PasteboardHelper.cpp: * platform/ios/LegacyTileGrid.h: * platform/mediarecorder/MediaRecorderPrivateAVFImpl.h: * platform/mediastream/gstreamer/GStreamerAudioData.h: (WebCore::GStreamerAudioData::GStreamerAudioData): Deleted. (WebCore::GStreamerAudioData::getSample): Deleted. (WebCore::GStreamerAudioData::getAudioInfo): Deleted. (WebCore::GStreamerAudioData::kind const): Deleted. * platform/mediastream/gstreamer/GStreamerCapturer.h: * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.h: * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.h: * platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h: * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp: * platform/mediastream/libwebrtc/LibWebRTCProvider.h: * platform/mediastream/libwebrtc/LibWebRTCProviderCocoa.h: * platform/mock/MediaPlaybackTargetPickerMock.h: * platform/mock/RTCDataChannelHandlerMock.h: * platform/network/ResourceErrorBase.h: * platform/network/curl/CookieJarDB.h: * platform/network/curl/CurlCacheEntry.h: * platform/network/curl/CurlContext.h: * platform/network/curl/CurlMultipartHandle.h: * platform/network/curl/CurlRequestScheduler.h: * platform/network/curl/CurlSSLVerifier.h: * platform/network/ios/PreviewConverter.h: * platform/network/soup/NetworkStorageSessionSoup.cpp: * platform/vr/openvr/VRPlatformDisplayOpenVR.h: * platform/vr/openvr/VRPlatformManagerOpenVR.h: * rendering/HitTestResult.h: * rendering/LayerOverlapMap.cpp: * rendering/RenderLayerCompositor.h: * rendering/svg/RenderSVGResourceMasker.h: * replay/UserInputBridge.h: * svg/graphics/filters/SVGFilterBuilder.h: * svg/properties/SVGAttributeAnimator.h: * svg/properties/SVGDecoratedProperty.h: * svg/properties/SVGPropertyAnimatorFactory.h: * testing/InternalSettings.cpp: * testing/LegacyMockCDM.cpp: * testing/LegacyMockCDM.h: * testing/MockCDMFactory.h: * workers/WorkerEventQueue.cpp: * workers/WorkerEventQueue.h: * workers/service/ServiceWorkerContainer.h: * worklets/PaintWorkletGlobalScope.h: * xml/XMLErrors.h: * xml/parser/XMLDocumentParserLibxml2.cpp: Source/WebDriver: * glib/SessionHostGlib.cpp: Source/WebKit: * NetworkProcess/AdClickAttributionManager.h: * NetworkProcess/Classifier/ResourceLoadStatisticsPersistentStorage.h: * NetworkProcess/Classifier/ResourceLoadStatisticsStore.h: * NetworkProcess/Cookies/WebCookieManager.h: * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: * NetworkProcess/NetworkHTTPSUpgradeChecker.h: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkSession.h: * NetworkProcess/NetworkSocketChannel.h: * NetworkProcess/WebSocketTask.h: * NetworkProcess/cache/PrefetchCache.h: * NetworkProcess/cocoa/WebSocketTaskCocoa.h: * NetworkProcess/soup/WebKitSoupRequestInputStream.cpp: * NetworkProcess/soup/WebSocketTaskSoup.h: * NetworkProcess/webrtc/LibWebRTCSocketClient.h: * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: * Platform/Module.h: * PluginProcess/PluginControllerProxy.h: * Shared/ApplePay/WebPaymentCoordinatorProxy.h: * Shared/Authentication/AuthenticationManager.h: * Shared/Cocoa/SandboxExtensionCocoa.mm: * Shared/Plugins/NPObjectMessageReceiver.h: * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: * UIProcess/API/APIAutomationClient.h: * UIProcess/API/APIAutomationSessionClient.h: * UIProcess/API/APIContextMenuClient.h: * UIProcess/API/APICustomProtocolManagerClient.h: * UIProcess/API/APIDiagnosticLoggingClient.h: * UIProcess/API/APIDownloadClient.h: * UIProcess/API/APIFindClient.h: * UIProcess/API/APIFindMatchesClient.h: * UIProcess/API/APIFormClient.h: * UIProcess/API/APIFullscreenClient.h: * UIProcess/API/APIGeolocationProvider.h: * UIProcess/API/APIHistoryClient.h: * UIProcess/API/APIIconDatabaseClient.h: * UIProcess/API/APIIconLoadingClient.h: * UIProcess/API/APIInjectedBundleClient.h: * UIProcess/API/APILegacyContextHistoryClient.h: * UIProcess/API/APILoaderClient.h: * UIProcess/API/APINavigationClient.h: * UIProcess/API/APIPolicyClient.h: * UIProcess/API/APIUIClient.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetPageStateClient): * UIProcess/API/Cocoa/WKUserContentController.mm: * UIProcess/API/Cocoa/_WKRemoteWebInspectorViewController.mm: * UIProcess/API/glib/IconDatabase.h: * UIProcess/API/glib/WebKitAutomationSession.cpp: * UIProcess/API/glib/WebKitIconLoadingClient.cpp: * UIProcess/API/glib/WebKitNotificationProvider.h: * UIProcess/API/glib/WebKitUserContentManager.cpp: * UIProcess/API/glib/WebKitWebContext.cpp: * UIProcess/API/glib/WebKitWebView.cpp: * UIProcess/API/gtk/WebKitRemoteInspectorProtocolHandler.cpp: * UIProcess/API/gtk/WebKitWebInspector.cpp: * UIProcess/API/mac/WKView.mm: (-[WKView maybeInstallIconLoadingClient]): * UIProcess/API/wpe/APIViewClient.h: * UIProcess/API/wpe/ScrollGestureController.h: * UIProcess/ApplicationStateTracker.h: * UIProcess/Cocoa/AutomationSessionClient.h: * UIProcess/Cocoa/IconLoadingDelegate.h: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h: * UIProcess/DrawingAreaProxy.h: * UIProcess/HighPerformanceGraphicsUsageSampler.h: * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/PageClient.h: * UIProcess/PerActivityStateCPUUsageSampler.h: * UIProcess/RemoteLayerTree/RemoteLayerTreeScrollingPerformanceData.h: * UIProcess/RemoteLayerTree/RemoteScrollingCoordinatorProxy.h: * UIProcess/RemoteLayerTree/ios/ScrollingTreeScrollingNodeDelegateIOS.h: * UIProcess/SystemPreviewController.h: * UIProcess/UserMediaPermissionRequestManagerProxy.h: * UIProcess/WebAuthentication/WebAuthenticatorCoordinatorProxy.h: * UIProcess/WebNavigationState.h: * UIProcess/WebPageInjectedBundleClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebsiteData/WebsiteDataStoreClient.h: * UIProcess/gtk/DragAndDropHandler.h: * UIProcess/ios/EditableImageController.h: * UIProcess/ios/InputViewUpdateDeferrer.h: * UIProcess/ios/SmartMagnificationController.h: * UIProcess/ios/fullscreen/WKFullScreenViewController.mm: * UIProcess/mac/WKFullScreenWindowController.mm: * UIProcess/mac/WKTextFinderClient.mm: * WebProcess/ApplePay/WebPaymentCoordinator.h: * WebProcess/Geolocation/GeolocationPermissionRequestManager.h: * WebProcess/Geolocation/WebGeolocationManager.h: * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp: * WebProcess/InjectedBundle/API/c/mac/WKBundlePageBannerMac.mm: * WebProcess/InjectedBundle/API/glib/DOM/DOMObjectCache.cpp: * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp: * WebProcess/MediaCache/WebMediaKeyStorageManager.h: * WebProcess/MediaStream/UserMediaPermissionRequestManager.h: * WebProcess/Network/webrtc/LibWebRTCProvider.cpp: * WebProcess/Network/webrtc/LibWebRTCResolver.h: * WebProcess/Notifications/WebNotificationManager.h: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h: * WebProcess/Plugins/PluginController.h: * WebProcess/Storage/WebSWOriginTable.h: * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: * WebProcess/WebCoreSupport/WebChromeClient.h: * WebProcess/WebCoreSupport/WebContextMenuClient.h: * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/WebGeolocationClient.h: * WebProcess/WebCoreSupport/WebInspectorClient.h: * WebProcess/WebCoreSupport/WebMessagePortChannelProvider.h: * WebProcess/WebCoreSupport/WebNotificationClient.h: * WebProcess/WebCoreSupport/WebPlugInClient.h: * WebProcess/WebCoreSupport/WebProgressTrackerClient.h: * WebProcess/WebCoreSupport/WebSpeechSynthesisClient.h: * WebProcess/WebCoreSupport/WebUserMediaClient.h: * WebProcess/WebPage/Cocoa/TextCheckingControllerProxy.h: * WebProcess/WebPage/FindController.h: * WebProcess/WebPage/ViewGestureGeometryCollector.h: * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: * WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h: * WebProcess/WebProcess.h: * WebProcess/cocoa/UserMediaCaptureManager.h: Source/WebKitLegacy/ios: * WebCoreSupport/WebChromeClientIOS.h: * WebCoreSupport/WebFixedPositionContent.mm: Source/WebKitLegacy/mac: * Plugins/Hosted/NetscapePluginInstanceProxy.h: * Plugins/Hosted/WebHostedNetscapePluginView.mm: * Plugins/WebNetscapePluginEventHandlerCocoa.h: * Storage/WebDatabaseManagerClient.mm: * WebCoreSupport/WebAlternativeTextClient.h: * WebCoreSupport/WebCachedFramePlatformData.h: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebContextMenuClient.h: * WebCoreSupport/WebDragClient.h: * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebGeolocationClient.h: * WebCoreSupport/WebInspectorClient.h: * WebCoreSupport/WebNotificationClient.h: * WebCoreSupport/WebSelectionServiceController.h: * WebView/WebMediaPlaybackTargetPicker.h: Source/WebKitLegacy/win: * FullscreenVideoController.cpp: * FullscreenVideoController.h: * Plugins/PluginMessageThrottlerWin.h: * WebCachedFramePlatformData.h: * WebCoreSupport/AcceleratedCompositingContext.h: * WebCoreSupport/WebChromeClient.h: * WebCoreSupport/WebContextMenuClient.h: * WebCoreSupport/WebDesktopNotificationsDelegate.h: * WebCoreSupport/WebDragClient.h: * WebCoreSupport/WebEditorClient.h: * WebCoreSupport/WebFrameLoaderClient.cpp: * WebCoreSupport/WebGeolocationClient.h: * WebCoreSupport/WebInspectorClient.h: * WebDatabaseManager.cpp: * WebKitQuartzCoreAdditions/CAD3DRenderer.h: * WebNodeHighlight.h: * WebNotificationCenter.cpp: * WebNotificationCenter.h: Tools: * DumpRenderTree/AccessibilityController.h: * DumpRenderTree/GCController.h: * DumpRenderTree/win/DRTDataObject.cpp: * DumpRenderTree/win/DRTDataObject.h: * DumpRenderTree/win/DRTDesktopNotificationPresenter.h: * DumpRenderTree/win/DRTDropSource.h: * DumpRenderTree/win/DraggingInfo.h: * DumpRenderTree/win/EditingDelegate.h: * DumpRenderTree/win/EventSender.cpp: * DumpRenderTree/win/FrameLoadDelegate.h: * DumpRenderTree/win/HistoryDelegate.h: * DumpRenderTree/win/MD5.h: * DumpRenderTree/win/PolicyDelegate.h: * DumpRenderTree/win/ResourceLoadDelegate.h: * DumpRenderTree/win/TextInputController.h: * DumpRenderTree/win/UIDelegate.cpp: * DumpRenderTree/win/UIDelegate.h: * TestRunnerShared/UIScriptContext/UIScriptContext.h: * TestRunnerShared/cocoa/ClassMethodSwizzler.h: * TestRunnerShared/cocoa/InstanceMethodSwizzler.h: * TestWebKitAPI/Counters.h: * TestWebKitAPI/PlatformWebView.h: * TestWebKitAPI/Tests/WTF/Expected.cpp: * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::DerefObserver::ref): (TestWebKitAPI::DerefObserver::deref): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashSet.cpp: (TestWebKitAPI::DerefObserver::ref): (TestWebKitAPI::DerefObserver::deref): (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/UniqueRef.cpp: * TestWebKitAPI/Tests/WTF/WeakPtr.cpp: * TestWebKitAPI/Tests/WebCore/CalculationValue.cpp: * TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.h: * TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h: * WebKitTestRunner/EventSenderProxy.h: * WebKitTestRunner/GeolocationProviderMock.h: * WebKitTestRunner/InjectedBundle/AccessibilityController.h: * WebKitTestRunner/InjectedBundle/EventSendingController.cpp: * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: * WebKitTestRunner/PlatformWebView.h: * WebKitTestRunner/TestInvocation.h: Canonical link: https://commits.webkit.org/214537@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-16 06:53:36 +00:00
WTF_MAKE_STRUCT_FAST_ALLOCATED;
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
static unsigned constructionCount;
static unsigned destructionCount;
struct TestingScope {
TestingScope()
{
constructionCount = 0;
destructionCount = 0;
}
};
ConstructorDestructorCounter() { constructionCount++; }
~ConstructorDestructorCounter() { destructionCount++; }
};
Fix build for future versions of Clang. https://bugs.webkit.org/show_bug.cgi?id=162346 Reviewed by Filip Pizlo. Source/JavaScriptCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * runtime/VM.h: (JSC::VM::setGlobalConstRedeclarationShouldThrow): Source/WebCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * Configurations/WebCore.unexp: * dom/Exception.h: * page/Frame.h: * platform/cocoa/WebPlaybackSessionModelMediaElement.h: * platform/cocoa/WebVideoFullscreenModelVideoElement.h: (WebCore::WebVideoFullscreenModelVideoElement::videoElement): * platform/graphics/Color.h: * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::rotate): * platform/mac/WebVideoFullscreenInterfaceMac.h: * platform/network/ParsedContentRange.h: (WebCore::ParsedContentRange::ParsedContentRange): (WebCore::ParsedContentRange::isValid): * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::certificateInfo): * platform/text/TextStream.h: (WebCore::TextStream::increaseIndent): (WebCore::TextStream::decreaseIndent): Source/WTF: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * wtf/text/StringImpl.h: Tools: * TestWebKitAPI/Counters.cpp: * TestWebKitAPI/Counters.h: (DeleterCounter::deleterCount): (DeleterCounter::TestingScope::TestingScope): (DeleterCounter::operator()): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/180391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-22 04:32:12 +00:00
#if COMPILER(CLANG)
#if __has_warning("-Wundefined-var-template")
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wundefined-var-template"
#endif
#endif
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
template<typename T>
struct DeleterCounter {
Fix build for future versions of Clang. https://bugs.webkit.org/show_bug.cgi?id=162346 Reviewed by Filip Pizlo. Source/JavaScriptCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * runtime/VM.h: (JSC::VM::setGlobalConstRedeclarationShouldThrow): Source/WebCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * Configurations/WebCore.unexp: * dom/Exception.h: * page/Frame.h: * platform/cocoa/WebPlaybackSessionModelMediaElement.h: * platform/cocoa/WebVideoFullscreenModelVideoElement.h: (WebCore::WebVideoFullscreenModelVideoElement::videoElement): * platform/graphics/Color.h: * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::rotate): * platform/mac/WebVideoFullscreenInterfaceMac.h: * platform/network/ParsedContentRange.h: (WebCore::ParsedContentRange::ParsedContentRange): (WebCore::ParsedContentRange::isValid): * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::certificateInfo): * platform/text/TextStream.h: (WebCore::TextStream::increaseIndent): (WebCore::TextStream::decreaseIndent): Source/WTF: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * wtf/text/StringImpl.h: Tools: * TestWebKitAPI/Counters.cpp: * TestWebKitAPI/Counters.h: (DeleterCounter::deleterCount): (DeleterCounter::TestingScope::TestingScope): (DeleterCounter::operator()): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/180391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-22 04:32:12 +00:00
static unsigned m_deleterCount;
static unsigned deleterCount() { return m_deleterCount; }
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
struct TestingScope {
TestingScope()
{
Fix build for future versions of Clang. https://bugs.webkit.org/show_bug.cgi?id=162346 Reviewed by Filip Pizlo. Source/JavaScriptCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * runtime/VM.h: (JSC::VM::setGlobalConstRedeclarationShouldThrow): Source/WebCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * Configurations/WebCore.unexp: * dom/Exception.h: * page/Frame.h: * platform/cocoa/WebPlaybackSessionModelMediaElement.h: * platform/cocoa/WebVideoFullscreenModelVideoElement.h: (WebCore::WebVideoFullscreenModelVideoElement::videoElement): * platform/graphics/Color.h: * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::rotate): * platform/mac/WebVideoFullscreenInterfaceMac.h: * platform/network/ParsedContentRange.h: (WebCore::ParsedContentRange::ParsedContentRange): (WebCore::ParsedContentRange::isValid): * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::certificateInfo): * platform/text/TextStream.h: (WebCore::TextStream::increaseIndent): (WebCore::TextStream::decreaseIndent): Source/WTF: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * wtf/text/StringImpl.h: Tools: * TestWebKitAPI/Counters.cpp: * TestWebKitAPI/Counters.h: (DeleterCounter::deleterCount): (DeleterCounter::TestingScope::TestingScope): (DeleterCounter::operator()): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/180391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-22 04:32:12 +00:00
m_deleterCount = 0;
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
}
};
void operator()(T* p) const
{
Fix build for future versions of Clang. https://bugs.webkit.org/show_bug.cgi?id=162346 Reviewed by Filip Pizlo. Source/JavaScriptCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * runtime/VM.h: (JSC::VM::setGlobalConstRedeclarationShouldThrow): Source/WebCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * Configurations/WebCore.unexp: * dom/Exception.h: * page/Frame.h: * platform/cocoa/WebPlaybackSessionModelMediaElement.h: * platform/cocoa/WebVideoFullscreenModelVideoElement.h: (WebCore::WebVideoFullscreenModelVideoElement::videoElement): * platform/graphics/Color.h: * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::rotate): * platform/mac/WebVideoFullscreenInterfaceMac.h: * platform/network/ParsedContentRange.h: (WebCore::ParsedContentRange::ParsedContentRange): (WebCore::ParsedContentRange::isValid): * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::certificateInfo): * platform/text/TextStream.h: (WebCore::TextStream::increaseIndent): (WebCore::TextStream::decreaseIndent): Source/WTF: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * wtf/text/StringImpl.h: Tools: * TestWebKitAPI/Counters.cpp: * TestWebKitAPI/Counters.h: (DeleterCounter::deleterCount): (DeleterCounter::TestingScope::TestingScope): (DeleterCounter::operator()): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/180391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-22 04:32:12 +00:00
m_deleterCount++;
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
delete p;
}
};
Fix build for future versions of Clang. https://bugs.webkit.org/show_bug.cgi?id=162346 Reviewed by Filip Pizlo. Source/JavaScriptCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * runtime/VM.h: (JSC::VM::setGlobalConstRedeclarationShouldThrow): Source/WebCore: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * Configurations/WebCore.unexp: * dom/Exception.h: * page/Frame.h: * platform/cocoa/WebPlaybackSessionModelMediaElement.h: * platform/cocoa/WebVideoFullscreenModelVideoElement.h: (WebCore::WebVideoFullscreenModelVideoElement::videoElement): * platform/graphics/Color.h: * platform/graphics/transforms/TransformationMatrix.h: (WebCore::TransformationMatrix::rotate): * platform/mac/WebVideoFullscreenInterfaceMac.h: * platform/network/ParsedContentRange.h: (WebCore::ParsedContentRange::ParsedContentRange): (WebCore::ParsedContentRange::isValid): * platform/network/ResourceResponseBase.h: (WebCore::ResourceResponseBase::certificateInfo): * platform/text/TextStream.h: (WebCore::TextStream::increaseIndent): (WebCore::TextStream::decreaseIndent): Source/WTF: This fixes issues with the WebCore build where inline template-class function definitions are marked as exported. This genereates a weak external symobl that our build does not like. * wtf/text/StringImpl.h: Tools: * TestWebKitAPI/Counters.cpp: * TestWebKitAPI/Counters.h: (DeleterCounter::deleterCount): (DeleterCounter::TestingScope::TestingScope): (DeleterCounter::operator()): * TestWebKitAPI/Tests/WTF/HashCountedSet.cpp: (TestWebKitAPI::TEST): * TestWebKitAPI/Tests/WTF/HashMap.cpp: (TestWebKitAPI::TEST): Canonical link: https://commits.webkit.org/180391@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@206245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2016-09-22 04:32:12 +00:00
#if COMPILER(CLANG)
#if __has_warning("-Wundefined-var-template")
#pragma clang diagnostic pop
#endif
#endif
Make possible HashSet<std::unique_ptr<>> https://bugs.webkit.org/show_bug.cgi?id=136166 Reviewed by Darin Adler. Source/WTF: * wtf/GetPtr.h: (WTF::getPtr): (WTF::GetPtrHelper<std::unique_ptr<T>>::getPtr): Make specializing GetPtrHelper a bit cleaner (you don't have to put IsSmartPtr<T>::value everywhere any more) and add specializations for std::unique_ptr. * wtf/HashFunctions.h: (WTF::PtrHash<std::unique_ptr<P>>): Add specialization for PtrHash for std::unique_ptr and set it as the DefaultHash for it as well. * wtf/HashMap.h: * wtf/HashSet.h: Add overloads of find(), contains(), remove(), take() (and get() for HashMap) for "smart pointers" that take the raw pointer type as the parameter. These use SFINAE to make themselves only available when the IsSmartPtr<KeyType>::value is true. * wtf/HashTraits.h: Override constructDeletedValue() and isDeletedValue() in the std::unique_ptr specialization since the default implementation depends on the type having a constructor that takes a HashTableDeletedValue and function named isHashTableDeletedValue(). * wtf/OwnPtr.h: (WTF::OwnPtr::OwnPtr): (WTF::OwnPtr::isHashTableDeletedValue): (WTF::OwnPtr::hashTableDeletedValue): Add HashTableDeletedValue constructor/functions to allow the constructDeletedValue() and isDeletedValue() hash traits to work. (WTF::PtrHash<OwnPtr<P>>::hash): (WTF::PtrHash<OwnPtr<P>>::equal): Add specialization for PtrHash for OwnPtr and set it as the DefaultHash for it as well. * wtf/Ref.h: Update for the less verbose GetPtrHelper specialization. Tools: * TestWebKitAPI/Tests/WTF/CopyMoveCounter.h: Removed. * TestWebKitAPI/Counters.cpp: Added. * TestWebKitAPI/Counters.h: Copied from Tools/TestWebKitAPI/Tests/WTF/CopyMoveCounter.h. Move the CopyMoveCounter helper from CopyMoveCounter.h to Counters.h, and add a ConstructorDestructorCounter helper to the mix as well. Add Counters.cpp to allow for the global variables to be used in more than one translation unit. * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new files. * TestWebKitAPI/Tests/WTF/HashMap.cpp: Add tests for using std::unique_ptr and OwnPtr as the key's of a HashMap. * TestWebKitAPI/Tests/WTF/HashSet.cpp: Add tests for using std::unique_ptr and OwnPtr as the values of a HashSet. Canonical link: https://commits.webkit.org/154797@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173801 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-09-22 00:24:44 +00:00
#endif // Counters_h