Remove out-parameter variants of copyToVector
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Oct 2017 15:38:42 +0000 (15:38 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Oct 2017 15:38:42 +0000 (15:38 +0000)
commitb14fda8abf4fe59d0bef380bee21e94350a9444e
tree8ef8b702b3bc34fd262866269dbb5829f40ccd31
parent42c8a598ad0054aa487e5ba0a48cfdd004958006
Remove out-parameter variants of copyToVector
https://bugs.webkit.org/show_bug.cgi?id=178155

Reviewed by Tim Horton.

Source/JavaScriptCore:

* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::dispatchBreakpointActionLog):
(Inspector::ScriptDebugServer::dispatchBreakpointActionSound):
(Inspector::ScriptDebugServer::dispatchBreakpointActionProbe):
(Inspector::ScriptDebugServer::dispatchDidParseSource):
(Inspector::ScriptDebugServer::dispatchFailedToParseSource):
(Inspector::ScriptDebugServer::dispatchFunctionToListeners):

    Replace out-parameter based copyToVector, with one that returns a Vector.

Source/WebCore:

* Modules/geolocation/Geolocation.cpp:
(WebCore::Geolocation::stopTimersForOneShots):
(WebCore::Geolocation::cancelAllRequests):
(WebCore::Geolocation::handleError):
(WebCore::Geolocation::makeSuccessCallbacks):
* Modules/indexeddb/IDBDatabase.cpp:
(WebCore::IDBDatabase::transaction):
* Modules/indexeddb/IDBGetAllResult.cpp:
(WebCore::IDBGetAllResult::allBlobFilePaths const):
* Modules/indexeddb/server/MemoryIndex.cpp:
(WebCore::IDBServer::MemoryIndex::notifyCursorsOfValueChange):
(WebCore::IDBServer::MemoryIndex::notifyCursorsOfAllRecordsChanged):
* css/CSSFontSelector.cpp:
(WebCore::CSSFontSelector::dispatchInvalidationCallbacks):
* dom/Document.cpp:
(WebCore::Document::moveNodeIteratorsToNewDocument):
(WebCore::Document::resume):
(WebCore::Document::didAssociateFormControlsTimerFired):
* dom/IdTargetObserverRegistry.cpp:
(WebCore::IdTargetObserverRegistry::notifyObserversInternal):
* dom/MutationObserver.cpp:
(WebCore::MutationObserver::notifyMutationObservers):
* dom/Node.cpp:
(WebCore::Document::invalidateNodeListAndCollectionCaches):
* dom/RadioButtonGroups.cpp:
* dom/ScriptExecutionContext.cpp:
(WebCore::ScriptExecutionContext::dispatchMessagePortEvents):
(WebCore::ScriptExecutionContext::stopActiveDOMObjects):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
(WebCore::ApplicationCacheGroup::deliverDelayedMainResources):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::forEachResource):
(WebCore::MemoryCache::pruneDeadResourcesToSize):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::willDestroyCachedFrame):
(WebCore::DOMWindow::willDestroyDocumentInFrame):
(WebCore::DOMWindow::willDetachDocumentFromFrame):
(WebCore::DOMWindow::disconnectDOMWindowProperties):
(WebCore::DOMWindow::reconnectDOMWindowProperties):
* page/FrameView.cpp:
(WebCore::collectAndProtectWidgets):
* page/MemoryRelease.cpp:
(WebCore::releaseCriticalMemory):
* page/Performance.cpp:
(WebCore::Performance::queueEntry):
* platform/cocoa/PasteboardCocoa.mm:
(WebCore::Pasteboard::typesForLegacyUnsafeBindings):
* platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::systemFontFamilies):
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
* platform/ios/WebCoreMotionManager.mm:
(-[WebCoreMotionManager sendAccelerometerData:]):
(-[WebCoreMotionManager sendMotionData:withHeading:]):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
* platform/network/cocoa/WebCoreNSURLSession.mm:
(-[WebCoreNSURLSession invalidateAndCancel]):
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::endAndCommitUpdateScrollInfoAfterLayoutTransaction):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::setLogicalWidthForTextRun):
* rendering/RenderDeprecatedFlexibleBox.cpp:
(WebCore::FlexBoxIterator::next):
* rendering/RenderTableSection.cpp:
(WebCore::RenderTableSection::paintObject):

    Replace out-parameter based copyToVector, with one that returns a Vector.

Source/WebKit:

* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface debugDescription]):
* Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::dump):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::createNewWebProcess):
* UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm:
(WebKit::WebsiteDataStore::parameters):
* UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::pendingCookies const):
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager _notifyClientsOfImminentSuspension]):
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::getHostnamesWithCookies):
* WebProcess/Geolocation/WebGeolocationManager.cpp:
(WebKit::WebGeolocationManager::didChangePosition):
(WebKit::WebGeolocationManager::didFailToDeterminePosition):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::internallyFailedLoadTimerFired):

    Replace out-parameter based copyToVector, with one that returns a Vector.

Source/WebKitLegacy/ios:

* Misc/WebGeolocationProviderIOS.mm:
(-[WebGeolocationProviderIOS _handlePendingInitialPosition:]):
(-[WebGeolocationProviderIOS positionChanged:]):
(-[WebGeolocationProviderIOS errorOccurred:]):
(-[WebGeolocationProviderIOS resetGeolocation]):

    Replace out-parameter based copyToVector, with one that returns a Vector.

Source/WebKitLegacy/mac:

* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView destroyPlugin]):
* WebView/WebHTMLRepresentation.mm:
(newArrayWithStrings):

    Replace out-parameter based copyToVector, with one that returns a Vector.

Source/WTF:

* wtf/HashMap.h:
(WTF::copyToVector): Deleted.
* wtf/HashSet.h:
(WTF::copyToVector): Deleted.

    Remove copyToVector.

* wtf/Vector.h:
(WTF::copyToVectorSpecialization):

    Add another version of copyToVector, called copyToVectorSpecialization, that allows
    you to specify the entire specialization for the Vector you want to copy to. This
    can be useful if you want your resulting Vector to have an inline capacity.

Tools:

* DumpRenderTree/JavaScriptThreading.cpp:
(stopJavaScriptThreads):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223238 268f45cc-cd09-0410-ab3c-d52691b4dbfc
54 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/ScriptDebugServer.cpp
Source/WTF/ChangeLog
Source/WTF/wtf/HashMap.h
Source/WTF/wtf/HashSet.h
Source/WTF/wtf/Vector.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/geolocation/Geolocation.cpp
Source/WebCore/Modules/indexeddb/IDBDatabase.cpp
Source/WebCore/Modules/indexeddb/IDBGetAllResult.cpp
Source/WebCore/Modules/indexeddb/server/MemoryIndex.cpp
Source/WebCore/css/CSSFontSelector.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/IdTargetObserverRegistry.cpp
Source/WebCore/dom/MutationObserver.cpp
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/RadioButtonGroups.cpp
Source/WebCore/dom/ScriptExecutionContext.cpp
Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/MemoryRelease.cpp
Source/WebCore/page/Performance.cpp
Source/WebCore/platform/cocoa/PasteboardCocoa.mm
Source/WebCore/platform/graphics/ca/win/LayerChangesFlusher.cpp
Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp
Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
Source/WebCore/platform/ios/WebCoreMotionManager.mm
Source/WebCore/platform/mac/PlatformPasteboardMac.mm
Source/WebCore/platform/network/cocoa/WebCoreNSURLSession.mm
Source/WebCore/platform/win/PasteboardWin.cpp
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBlockLineLayout.cpp
Source/WebCore/rendering/RenderDeprecatedFlexibleBox.cpp
Source/WebCore/rendering/RenderTableSection.cpp
Source/WebKit/ChangeLog
Source/WebKit/Shared/API/Cocoa/_WKRemoteObjectInterface.mm
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm
Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp
Source/WebKit/UIProcess/ios/ProcessAssertionIOS.mm
Source/WebKit/WebProcess/Cookies/WebCookieManager.cpp
Source/WebKit/WebProcess/Geolocation/WebGeolocationManager.cpp
Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
Source/WebKitLegacy/ios/ChangeLog
Source/WebKitLegacy/ios/Misc/WebGeolocationProviderIOS.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Plugins/WebNetscapePluginView.mm
Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm
Tools/ChangeLog
Tools/DumpRenderTree/JavaScriptThreading.cpp