ensure*Connection() methods on WebProcess should return a reference
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Nov 2017 19:40:12 +0000 (19:40 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 29 Nov 2017 19:40:12 +0000 (19:40 +0000)
commit781f2f1a56a47a4211c99257aef5b08999ebc0e9
tree540b19f8f1e67733d50b7b17f2e22071947ea8d4
parent1eba9c25bf2ee96d61609b52ad8d7826a4060e6c
ensure*Connection() methods on WebProcess should return a reference
https://bugs.webkit.org/show_bug.cgi?id=180149

Reviewed by Alex Christensen.

ensure*Connection() methods on WebProcess should return a reference instead of not returning
anything. Also get rid of the non-ensure variants which called "ensure" internally and are
no longer needed.

* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
* WebProcess/Cache/WebCacheStorageConnection.cpp:
(WebKit::WebCacheStorageConnection::connection):
* WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp:
(WebKit::WebIDBConnectionToServer::messageSenderConnection):
(WebKit::preregisterSandboxExtensionsIfNecessary):
* WebProcess/Databases/WebDatabaseProvider.cpp:
(WebKit::WebDatabaseProvider::idbConnectionToServerForSession):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLOptionallyFileBacked):
(WebKit::BlobRegistryProxy::unregisterBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::blobSize):
(WebKit::BlobRegistryProxy::writeBlobsToTemporaryFiles):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::writeBlobsToTemporaryFiles):
* WebProcess/Network/WebLoaderStrategy.cpp:
(WebKit::WebLoaderStrategy::scheduleLoadFromNetworkProcess):
(WebKit::WebLoaderStrategy::remove):
(WebKit::WebLoaderStrategy::setDefersLoading):
(WebKit::WebLoaderStrategy::loadResourceSynchronously):
(WebKit::WebLoaderStrategy::startPingLoad):
(WebKit::WebLoaderStrategy::preconnectTo):
(WebKit::WebLoaderStrategy::storeDerivedDataToCache):
(WebKit::WebLoaderStrategy::setCaptureExtraNetworkLoadMetricsEnabled):
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::messageSenderConnection):
* WebProcess/Network/WebSocketStream.cpp:
(WebKit::WebSocketStream::WebSocketStream):
(WebKit::WebSocketStream::messageSenderConnection):
* WebProcess/Network/webrtc/LibWebRTCResolver.cpp:
(WebKit::sendOnMainThread):
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::sendOnMainThread):
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
(WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
(WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
(WebKit::LibWebRTCSocketFactory::createNewConnectionSocket):
* WebProcess/Network/webrtc/WebRTCMonitor.cpp:
(WebKit::sendOnMainThread):
* WebProcess/Storage/WebServiceWorkerProvider.cpp:
(WebKit::WebServiceWorkerProvider::serviceWorkerConnectionForSession):
(WebKit::WebServiceWorkerProvider::handleFetch):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::startDownload):
(WebKit::WebFrame::convertMainResourceLoadToDownload):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureLegacyPrivateBrowsingSessionInNetworkProcess):
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::ensureWebToStorageProcessConnection):
(WebKit::WebProcess::prefetchDNS):
* WebProcess/WebProcess.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@225282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/WebKit/ChangeLog
Source/WebKit/Shared/mac/CookieStorageShim.mm
Source/WebKit/WebProcess/Cache/WebCacheStorageConnection.cpp
Source/WebKit/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.cpp
Source/WebKit/WebProcess/Databases/WebDatabaseProvider.cpp
Source/WebKit/WebProcess/FileAPI/BlobRegistryProxy.cpp
Source/WebKit/WebProcess/Network/NetworkProcessConnection.cpp
Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp
Source/WebKit/WebProcess/Network/WebResourceLoader.cpp
Source/WebKit/WebProcess/Network/WebSocketStream.cpp
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCResolver.cpp
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.cpp
Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp
Source/WebKit/WebProcess/Network/webrtc/WebRTCMonitor.cpp
Source/WebKit/WebProcess/Storage/WebServiceWorkerProvider.cpp
Source/WebKit/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit/WebProcess/WebPage/WebFrame.cpp
Source/WebKit/WebProcess/WebProcess.cpp
Source/WebKit/WebProcess/WebProcess.h