Diff
Modified: trunk/Source/WebCore/ChangeLog (250046 => 250047)
--- trunk/Source/WebCore/ChangeLog 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebCore/ChangeLog 2019-09-18 18:47:03 UTC (rev 250047)
@@ -1,5 +1,20 @@
2019-09-18 Chris Dumez <[email protected]>
+ WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
+ https://bugs.webkit.org/show_bug.cgi?id=201882
+
+ Reviewed by Geoffrey Garen.
+
+ WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
+ sessionID per WebProcess.
+
+ * workers/service/server/SWServer.cpp:
+ (WebCore::SWServer::installContextData):
+ (WebCore::SWServer::runServiceWorker):
+ * workers/service/server/SWServerToContextConnection.h:
+
+2019-09-18 Chris Dumez <[email protected]>
+
CacheStorageProvider::createCacheStorageConnection() does not need to take in a SessionID
https://bugs.webkit.org/show_bug.cgi?id=201920
Modified: trunk/Source/WebCore/workers/service/server/SWServer.cpp (250046 => 250047)
--- trunk/Source/WebCore/workers/service/server/SWServer.cpp 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebCore/workers/service/server/SWServer.cpp 2019-09-18 18:47:03 UTC (rev 250047)
@@ -587,7 +587,7 @@
auto result = m_runningOrTerminatingWorkers.add(data.serviceWorkerIdentifier, WTFMove(worker));
ASSERT_UNUSED(result, result.isNewEntry);
- connection->installServiceWorkerContext(data, m_sessionID, userAgent);
+ connection->installServiceWorkerContext(data, userAgent);
}
void SWServer::runServiceWorkerIfNecessary(ServiceWorkerIdentifier identifier, RunServiceWorkerCallback&& callback)
@@ -643,7 +643,7 @@
auto* contextConnection = worker->contextConnection();
ASSERT(contextConnection);
- contextConnection->installServiceWorkerContext(worker->contextData(), m_sessionID, worker->userAgent());
+ contextConnection->installServiceWorkerContext(worker->contextData(), worker->userAgent());
return true;
}
Modified: trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h (250046 => 250047)
--- trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebCore/workers/service/server/SWServerToContextConnection.h 2019-09-18 18:47:03 UTC (rev 250047)
@@ -53,7 +53,7 @@
SWServerToContextConnectionIdentifier identifier() const { return m_identifier; }
// Messages to the SW host process
- virtual void installServiceWorkerContext(const ServiceWorkerContextData&, PAL::SessionID, const String& userAgent) = 0;
+ virtual void installServiceWorkerContext(const ServiceWorkerContextData&, const String& userAgent) = 0;
virtual void fireInstallEvent(ServiceWorkerIdentifier) = 0;
virtual void fireActivateEvent(ServiceWorkerIdentifier) = 0;
virtual void softUpdate(ServiceWorkerIdentifier) = 0;
Modified: trunk/Source/WebKit/ChangeLog (250046 => 250047)
--- trunk/Source/WebKit/ChangeLog 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/ChangeLog 2019-09-18 18:47:03 UTC (rev 250047)
@@ -1,5 +1,28 @@
2019-09-18 Chris Dumez <[email protected]>
+ WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID
+ https://bugs.webkit.org/show_bug.cgi?id=201882
+
+ Reviewed by Geoffrey Garen.
+
+ WebSWContextManagerConnection::installServiceWorker IPC no longer need a sessionID now that we have a single
+ sessionID per WebProcess.
+
+ * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp:
+ (WebKit::WebSWServerToContextConnection::installServiceWorkerContext):
+ * NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h:
+ * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+ (WebKit::ServiceWorkerFrameLoaderClient::ServiceWorkerFrameLoaderClient):
+ (WebKit::ServiceWorkerFrameLoaderClient::sessionID const):
+ (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
+ (WebKit::WebSWContextManagerConnection::installServiceWorker):
+ * WebProcess/Storage/WebSWContextManagerConnection.h:
+ * WebProcess/Storage/WebSWContextManagerConnection.messages.in:
+ * WebProcess/WebProcess.cpp:
+ (WebKit::WebProcess::establishWorkerContextConnectionToNetworkProcess):
+
+2019-09-18 Chris Dumez <[email protected]>
+
Stop passing sessionIDs to NetworkProcessConnection methods
https://bugs.webkit.org/show_bug.cgi?id=201886
Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp (250046 => 250047)
--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.cpp 2019-09-18 18:47:03 UTC (rev 250047)
@@ -83,9 +83,9 @@
connection->postMessageToServiceWorkerClient(destinationIdentifier.contextIdentifier, message, sourceIdentifier, sourceOrigin);
}
-void WebSWServerToContextConnection::installServiceWorkerContext(const ServiceWorkerContextData& data, PAL::SessionID sessionID, const String& userAgent)
+void WebSWServerToContextConnection::installServiceWorkerContext(const ServiceWorkerContextData& data, const String& userAgent)
{
- send(Messages::WebSWContextManagerConnection::InstallServiceWorker { data, sessionID, userAgent });
+ send(Messages::WebSWContextManagerConnection::InstallServiceWorker { data, userAgent });
}
void WebSWServerToContextConnection::fireInstallEvent(ServiceWorkerIdentifier serviceWorkerIdentifier)
Modified: trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h (250046 => 250047)
--- trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/NetworkProcess/ServiceWorker/WebSWServerToContextConnection.h 2019-09-18 18:47:03 UTC (rev 250047)
@@ -80,7 +80,7 @@
void postMessageToServiceWorkerClient(const WebCore::ServiceWorkerClientIdentifier& destinationIdentifier, const WebCore::MessageWithMessagePorts&, WebCore::ServiceWorkerIdentifier sourceIdentifier, const String& sourceOrigin);
// Messages to the SW host WebProcess
- void installServiceWorkerContext(const WebCore::ServiceWorkerContextData&, PAL::SessionID, const String& userAgent) final;
+ void installServiceWorkerContext(const WebCore::ServiceWorkerContextData&, const String& userAgent) final;
void fireInstallEvent(WebCore::ServiceWorkerIdentifier) final;
void fireActivateEvent(WebCore::ServiceWorkerIdentifier) final;
void softUpdate(WebCore::ServiceWorkerIdentifier) final;
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (250046 => 250047)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp 2019-09-18 18:47:03 UTC (rev 250047)
@@ -86,7 +86,7 @@
return WebDocumentLoader::create(request, substituteData);
}
-WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, WebCore::RegistrableDomain&& registrableDomain, PAL::SessionID sessionID, uint64_t pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store)
+WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, WebCore::RegistrableDomain&& registrableDomain, uint64_t pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store)
: m_connectionToNetworkProcess(WTFMove(connection))
, m_registrableDomain(WTFMove(registrableDomain))
, m_pageGroupID(pageGroupID)
@@ -120,7 +120,7 @@
m_storageBlockingPolicy = static_cast<SecurityOrigin::StorageBlockingPolicy>(store.getUInt32ValueForKey(WebPreferencesKey::storageBlockingPolicyKey()));
}
-void WebSWContextManagerConnection::installServiceWorker(const ServiceWorkerContextData& data, SessionID sessionID, String&& userAgent)
+void WebSWContextManagerConnection::installServiceWorker(const ServiceWorkerContextData& data, String&& userAgent)
{
LOG(ServiceWorker, "WebSWContextManagerConnection::installServiceWorker for worker %s", data.serviceWorkerIdentifier.loggingString().utf8().data());
@@ -142,7 +142,7 @@
pageConfiguration.loaderClientForMainFrame = frameLoaderClient.get();
m_loaders.add(WTFMove(frameLoaderClient));
- auto serviceWorkerThreadProxy = ServiceWorkerThreadProxy::create(WTFMove(pageConfiguration), data, sessionID, WTFMove(effectiveUserAgent), WebProcess::singleton().cacheStorageProvider(), m_storageBlockingPolicy);
+ auto serviceWorkerThreadProxy = ServiceWorkerThreadProxy::create(WTFMove(pageConfiguration), data, WebProcess::singleton().sessionID(), WTFMove(effectiveUserAgent), WebProcess::singleton().cacheStorageProvider(), m_storageBlockingPolicy);
SWContextManager::singleton().registerServiceWorkerThreadForInstall(WTFMove(serviceWorkerThreadProxy));
LOG(ServiceWorker, "Context process PID: %i created worker thread\n", getCurrentProcessID());
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h (250046 => 250047)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h 2019-09-18 18:47:03 UTC (rev 250047)
@@ -53,7 +53,7 @@
class WebSWContextManagerConnection final : public WebCore::SWContextManager::Connection, public IPC::MessageReceiver {
public:
- WebSWContextManagerConnection(Ref<IPC::Connection>&&, WebCore::RegistrableDomain&&, PAL::SessionID, uint64_t pageGroupID, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&);
+ WebSWContextManagerConnection(Ref<IPC::Connection>&&, WebCore::RegistrableDomain&&, uint64_t pageGroupID, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&);
~WebSWContextManagerConnection();
void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;
@@ -80,7 +80,7 @@
// IPC messages.
void serviceWorkerStarted(Optional<WebCore::ServiceWorkerJobDataIdentifier>, WebCore::ServiceWorkerIdentifier, bool doesHandleFetch) final;
void serviceWorkerFailedToStart(Optional<WebCore::ServiceWorkerJobDataIdentifier>, WebCore::ServiceWorkerIdentifier, const String& exceptionMessage) final;
- void installServiceWorker(const WebCore::ServiceWorkerContextData&, PAL::SessionID, String&& userAgent);
+ void installServiceWorker(const WebCore::ServiceWorkerContextData&, String&& userAgent);
void startFetch(WebCore::SWServerConnectionIdentifier, WebCore::ServiceWorkerIdentifier, WebCore::FetchIdentifier, WebCore::ResourceRequest&&, WebCore::FetchOptions&&, IPC::FormDataReference&&, String&& referrer);
void cancelFetch(WebCore::SWServerConnectionIdentifier, WebCore::ServiceWorkerIdentifier, WebCore::FetchIdentifier);
void continueDidReceiveFetchResponse(WebCore::SWServerConnectionIdentifier, WebCore::ServiceWorkerIdentifier, WebCore::FetchIdentifier);
Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in (250046 => 250047)
--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.messages.in 2019-09-18 18:47:03 UTC (rev 250047)
@@ -23,7 +23,7 @@
#if ENABLE(SERVICE_WORKER)
messages -> WebSWContextManagerConnection {
- InstallServiceWorker(struct WebCore::ServiceWorkerContextData contextData, PAL::SessionID sessionID, String userAgent)
+ InstallServiceWorker(struct WebCore::ServiceWorkerContextData contextData, String userAgent)
StartFetch(WebCore::SWServerConnectionIdentifier serverConnectionIdentifier, WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::FetchIdentifier fetchIdentifier, WebCore::ResourceRequest request, struct WebCore::FetchOptions options, IPC::FormDataReference requestBody, String referrer)
CancelFetch(WebCore::SWServerConnectionIdentifier serverConnectionIdentifier, WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::FetchIdentifier fetchIdentifier)
ContinueDidReceiveFetchResponse(WebCore::SWServerConnectionIdentifier serverConnectionIdentifier, WebCore::ServiceWorkerIdentifier serviceWorkerIdentifier, WebCore::FetchIdentifier fetchIdentifier)
Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (250046 => 250047)
--- trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-09-18 18:38:25 UTC (rev 250046)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp 2019-09-18 18:47:03 UTC (rev 250047)
@@ -1794,7 +1794,7 @@
// by calling ensureNetworkProcessConnection. SWContextManager needs to use the same underlying IPC::Connection as the
// NetworkProcessConnection for synchronization purposes.
auto& ipcConnection = ensureNetworkProcessConnection().connection();
- SWContextManager::singleton().setConnection(makeUnique<WebSWContextManagerConnection>(ipcConnection, WTFMove(registrableDomain), sessionID(), pageGroupID, webPageProxyID, pageID, store));
+ SWContextManager::singleton().setConnection(makeUnique<WebSWContextManagerConnection>(ipcConnection, WTFMove(registrableDomain), pageGroupID, webPageProxyID, pageID, store));
}
void WebProcess::registerServiceWorkerClients()