Title: [289063] trunk/Source/WebKit
Revision
289063
Author
[email protected]
Date
2022-02-03 11:44:54 -0800 (Thu, 03 Feb 2022)

Log Message

Rename ServiceWorkerInitializationData / ServiceWorkerInformation so they can be reused by shared workers
https://bugs.webkit.org/show_bug.cgi?id=236089

Reviewed by Alex Christensen.

* Shared/RemoteWorkerInitializationData.cpp: Renamed from Source/WebKit/Shared/ServiceWorkerInitializationData.cpp.
(WebKit::RemoteWorkerInitializationData::encode const):
(WebKit::RemoteWorkerInitializationData::decode):
* Shared/RemoteWorkerInitializationData.h: Renamed from Source/WebKit/Shared/ServiceWorkerInitializationData.h.
* Sources.txt:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::enableServiceWorkers):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::hasServiceWorkerPageProxy):
* WebKit.xcodeproj/project.pbxproj:
* WebProcess/Storage/WebSWContextManagerConnection.cpp:
(WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
* WebProcess/Storage/WebSWContextManagerConnection.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::establishServiceWorkerContextConnectionToNetworkProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (289062 => 289063)


--- trunk/Source/WebKit/ChangeLog	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/ChangeLog	2022-02-03 19:44:54 UTC (rev 289063)
@@ -1,3 +1,28 @@
+2022-02-03  Chris Dumez  <[email protected]>
+
+        Rename ServiceWorkerInitializationData / ServiceWorkerInformation so they can be reused by shared workers
+        https://bugs.webkit.org/show_bug.cgi?id=236089
+
+        Reviewed by Alex Christensen.
+
+        * Shared/RemoteWorkerInitializationData.cpp: Renamed from Source/WebKit/Shared/ServiceWorkerInitializationData.cpp.
+        (WebKit::RemoteWorkerInitializationData::encode const):
+        (WebKit::RemoteWorkerInitializationData::decode):
+        * Shared/RemoteWorkerInitializationData.h: Renamed from Source/WebKit/Shared/ServiceWorkerInitializationData.h.
+        * Sources.txt:
+        * UIProcess/WebProcessProxy.cpp:
+        (WebKit::WebProcessProxy::enableServiceWorkers):
+        * UIProcess/WebProcessProxy.h:
+        (WebKit::WebProcessProxy::hasServiceWorkerPageProxy):
+        * WebKit.xcodeproj/project.pbxproj:
+        * WebProcess/Storage/WebSWContextManagerConnection.cpp:
+        (WebKit::WebSWContextManagerConnection::WebSWContextManagerConnection):
+        * WebProcess/Storage/WebSWContextManagerConnection.h:
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::establishServiceWorkerContextConnectionToNetworkProcess):
+        * WebProcess/WebProcess.h:
+        * WebProcess/WebProcess.messages.in:
+
 2022-02-03  Kimmo Kinnunen  <[email protected]>
 
         Crash at com.apple.WebKit: WebKit::RemoteLayerBackingStore::display

Copied: trunk/Source/WebKit/Shared/RemoteWorkerInitializationData.cpp (from rev 289062, trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.cpp) (0 => 289063)


--- trunk/Source/WebKit/Shared/RemoteWorkerInitializationData.cpp	                        (rev 0)
+++ trunk/Source/WebKit/Shared/RemoteWorkerInitializationData.cpp	2022-02-03 19:44:54 UTC (rev 289063)
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2019-2022 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.
+ */
+
+#include "config.h"
+#include "RemoteWorkerInitializationData.h"
+
+#include "ArgumentCoders.h"
+#include "Decoder.h"
+#include "Encoder.h"
+#include "WebCompiledContentRuleListData.h"
+#include <wtf/URL.h>
+
+namespace WebKit {
+
+void RemoteWorkerInitializationData::encode(IPC::Encoder& encoder) const
+{
+    encoder << userContentControllerIdentifier;
+#if ENABLE(CONTENT_EXTENSIONS)
+    encoder << contentRuleLists;
+#endif
+}
+
+std::optional<RemoteWorkerInitializationData> RemoteWorkerInitializationData::decode(IPC::Decoder& decoder)
+{
+    std::optional<UserContentControllerIdentifier> userContentControllerIdentifier;
+    decoder >> userContentControllerIdentifier;
+    if (!userContentControllerIdentifier)
+        return std::nullopt;
+    
+#if ENABLE(CONTENT_EXTENSIONS)
+    std::optional<Vector<std::pair<WebCompiledContentRuleListData, URL>>> contentRuleLists;
+    decoder >> contentRuleLists;
+    if (!contentRuleLists)
+        return std::nullopt;
+#endif
+    
+    return { {
+        WTFMove(*userContentControllerIdentifier),
+#if ENABLE(CONTENT_EXTENSIONS)
+        WTFMove(*contentRuleLists),
+#endif
+    } };
+}
+
+}

Copied: trunk/Source/WebKit/Shared/RemoteWorkerInitializationData.h (from rev 289062, trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.h) (0 => 289063)


--- trunk/Source/WebKit/Shared/RemoteWorkerInitializationData.h	                        (rev 0)
+++ trunk/Source/WebKit/Shared/RemoteWorkerInitializationData.h	2022-02-03 19:44:54 UTC (rev 289063)
@@ -0,0 +1,51 @@
+/*
+ * Copyright (C) 2019-2022 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.
+ */
+
+#pragma once
+
+#include "UserContentControllerIdentifier.h"
+#include <wtf/Forward.h>
+
+namespace IPC {
+class Decoder;
+class Encoder;
+}
+
+namespace WebKit {
+
+class WebCompiledContentRuleListData;
+
+struct RemoteWorkerInitializationData {
+
+    void encode(IPC::Encoder&) const;
+    static std::optional<RemoteWorkerInitializationData> decode(IPC::Decoder&);
+
+    UserContentControllerIdentifier userContentControllerIdentifier;
+#if ENABLE(CONTENT_EXTENSIONS)
+    Vector<std::pair<WebCompiledContentRuleListData, URL>> contentRuleLists;
+#endif
+};
+
+} // namespace WebKit

Deleted: trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.cpp (289062 => 289063)


--- trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.cpp	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.cpp	2022-02-03 19:44:54 UTC (rev 289063)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#include "config.h"
-#include "ServiceWorkerInitializationData.h"
-
-#include "ArgumentCoders.h"
-#include "Decoder.h"
-#include "Encoder.h"
-#include "WebCompiledContentRuleListData.h"
-#include <wtf/URL.h>
-
-namespace WebKit {
-
-void ServiceWorkerInitializationData::encode(IPC::Encoder& encoder) const
-{
-    encoder << userContentControllerIdentifier;
-#if ENABLE(CONTENT_EXTENSIONS)
-    encoder << contentRuleLists;
-#endif
-}
-
-std::optional<ServiceWorkerInitializationData> ServiceWorkerInitializationData::decode(IPC::Decoder& decoder)
-{
-    std::optional<UserContentControllerIdentifier> userContentControllerIdentifier;
-    decoder >> userContentControllerIdentifier;
-    if (!userContentControllerIdentifier)
-        return std::nullopt;
-    
-#if ENABLE(CONTENT_EXTENSIONS)
-    std::optional<Vector<std::pair<WebCompiledContentRuleListData, URL>>> contentRuleLists;
-    decoder >> contentRuleLists;
-    if (!contentRuleLists)
-        return std::nullopt;
-#endif
-    
-    return {{
-        WTFMove(*userContentControllerIdentifier),
-#if ENABLE(CONTENT_EXTENSIONS)
-        WTFMove(*contentRuleLists),
-#endif
-    }};
-}
-
-}

Deleted: trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.h (289062 => 289063)


--- trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.h	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/Shared/ServiceWorkerInitializationData.h	2022-02-03 19:44:54 UTC (rev 289063)
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2019 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.
- */
-
-#pragma once
-
-#include "UserContentControllerIdentifier.h"
-#include <wtf/Forward.h>
-
-namespace IPC {
-class Decoder;
-class Encoder;
-}
-
-namespace WebKit {
-
-class WebCompiledContentRuleListData;
-
-struct ServiceWorkerInitializationData {
-
-    void encode(IPC::Encoder&) const;
-    static std::optional<ServiceWorkerInitializationData> decode(IPC::Decoder&);
-
-    UserContentControllerIdentifier userContentControllerIdentifier;
-#if ENABLE(CONTENT_EXTENSIONS)
-    Vector<std::pair<WebCompiledContentRuleListData, URL>> contentRuleLists;
-#endif
-};
-
-} // namespace WebKit

Modified: trunk/Source/WebKit/Sources.txt (289062 => 289063)


--- trunk/Source/WebKit/Sources.txt	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/Sources.txt	2022-02-03 19:44:54 UTC (rev 289063)
@@ -230,8 +230,8 @@
 Shared/PrintInfo.cpp
 Shared/RTCNetwork.cpp
 Shared/RTCPacketOptions.cpp
+Shared/RemoteWorkerInitializationData.cpp
 Shared/ScrollingAccelerationCurve.cpp
-Shared/ServiceWorkerInitializationData.cpp
 Shared/SessionState.cpp
 Shared/ShareableBitmap.cpp
 Shared/ShareableResource.cpp

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp (289062 => 289063)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.cpp	2022-02-03 19:44:54 UTC (rev 289063)
@@ -1866,7 +1866,7 @@
 {
     WEBPROCESSPROXY_RELEASE_LOG(Loading, "establishServiceWorkerContext: Started");
     markProcessAsRecentlyUsed();
-    sendWithAsyncReply(Messages::WebProcess::EstablishServiceWorkerContextConnectionToNetworkProcess { processPool().defaultPageGroup().pageGroupID(), m_serviceWorkerInformation->serviceWorkerPageProxyID, m_serviceWorkerInformation->serviceWorkerPageID, store, registrableDomain, serviceWorkerPageIdentifier, m_serviceWorkerInformation->initializationData }, [this, weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)]() mutable {
+    sendWithAsyncReply(Messages::WebProcess::EstablishServiceWorkerContextConnectionToNetworkProcess { processPool().defaultPageGroup().pageGroupID(), m_serviceWorkerInformation->remoteWorkerPageProxyID, m_serviceWorkerInformation->remoteWorkerPageID, store, registrableDomain, serviceWorkerPageIdentifier, m_serviceWorkerInformation->initializationData }, [this, weakThis = WeakPtr { *this }, completionHandler = WTFMove(completionHandler)]() mutable {
         if (weakThis)
             WEBPROCESSPROXY_RELEASE_LOG(Loading, "establishServiceWorkerContext: Finished");
         completionHandler();
@@ -2008,10 +2008,10 @@
 {
     ASSERT(!m_serviceWorkerInformation);
     WEBPROCESSPROXY_RELEASE_LOG(ServiceWorker, "enableServiceWorkers:");
-    m_serviceWorkerInformation = ServiceWorkerInformation {
+    m_serviceWorkerInformation = RemoteWorkerInformation {
         WebPageProxyIdentifier::generate(),
         PageIdentifier::generate(),
-        ServiceWorkerInitializationData {
+        RemoteWorkerInitializationData {
             userContentControllerIdentifier,
 #if ENABLE(CONTENT_EXTENSIONS)
             contentRuleListsFromIdentifier(userContentControllerIdentifier),

Modified: trunk/Source/WebKit/UIProcess/WebProcessProxy.h (289062 => 289063)


--- trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/UIProcess/WebProcessProxy.h	2022-02-03 19:44:54 UTC (rev 289063)
@@ -35,8 +35,8 @@
 #include "ProcessTerminationReason.h"
 #include "ProcessThrottler.h"
 #include "ProcessThrottlerClient.h"
+#include "RemoteWorkerInitializationData.h"
 #include "ResponsivenessTimer.h"
-#include "ServiceWorkerInitializationData.h"
 #include "SpeechRecognitionServer.h"
 #include "UserContentControllerIdentifier.h"
 #include "VisibleWebPageCounter.h"
@@ -363,7 +363,7 @@
     void establishServiceWorkerContext(const WebPreferencesStore&, const WebCore::RegistrableDomain&, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, CompletionHandler<void()>&&);
     void setServiceWorkerUserAgent(const String&);
     void updateServiceWorkerPreferencesStore(const WebPreferencesStore&);
-    bool hasServiceWorkerPageProxy(WebPageProxyIdentifier pageProxyID) { return m_serviceWorkerInformation && m_serviceWorkerInformation->serviceWorkerPageProxyID == pageProxyID; }
+    bool hasServiceWorkerPageProxy(WebPageProxyIdentifier pageProxyID) { return m_serviceWorkerInformation && m_serviceWorkerInformation->remoteWorkerPageProxyID == pageProxyID; }
     void updateServiceWorkerProcessAssertion();
     void registerServiceWorkerClientProcess(WebProcessProxy&);
     void unregisterServiceWorkerClientProcess(WebProcessProxy&);
@@ -648,14 +648,14 @@
 #endif
     RefPtr<Logger> m_logger;
 
-    struct ServiceWorkerInformation {
-        WebPageProxyIdentifier serviceWorkerPageProxyID;
-        WebCore::PageIdentifier serviceWorkerPageID;
-        ServiceWorkerInitializationData initializationData;
+    struct RemoteWorkerInformation {
+        WebPageProxyIdentifier remoteWorkerPageProxyID;
+        WebCore::PageIdentifier remoteWorkerPageID;
+        RemoteWorkerInitializationData initializationData;
         ProcessThrottler::ActivityVariant activity;
         WeakHashSet<WebProcessProxy> clientProcesses;
     };
-    std::optional<ServiceWorkerInformation> m_serviceWorkerInformation;
+    std::optional<RemoteWorkerInformation> m_serviceWorkerInformation;
     bool m_hasServiceWorkerBackgroundProcessing { false };
 
     HashMap<WebCore::SleepDisablerIdentifier, std::unique_ptr<WebCore::SleepDisabler>> m_sleepDisablers;

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (289062 => 289063)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-02-03 19:44:54 UTC (rev 289063)
@@ -4889,8 +4889,8 @@
 		5C7C88DC1D0F41A0009D2F6D /* WebSocketProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebSocketProvider.h; path = Network/WebSocketProvider.h; sourceTree = "<group>"; };
 		5C7FB46E21E97C0B009E3241 /* WebCookieJar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCookieJar.cpp; sourceTree = "<group>"; };
 		5C7FB46F21E97C0C009E3241 /* WebCookieJar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCookieJar.h; sourceTree = "<group>"; };
-		5C80B3DB23690D8D0086E6DE /* ServiceWorkerInitializationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerInitializationData.h; sourceTree = "<group>"; };
-		5C80B3DD23690F100086E6DE /* ServiceWorkerInitializationData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerInitializationData.cpp; sourceTree = "<group>"; };
+		5C80B3DB23690D8D0086E6DE /* RemoteWorkerInitializationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RemoteWorkerInitializationData.h; sourceTree = "<group>"; };
+		5C80B3DD23690F100086E6DE /* RemoteWorkerInitializationData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteWorkerInitializationData.cpp; sourceTree = "<group>"; };
 		5C826D6726D46B43008AEC91 /* PrivateClickMeasurementStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrivateClickMeasurementStore.cpp; sourceTree = "<group>"; };
 		5C826D6826D46B44008AEC91 /* PrivateClickMeasurementStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivateClickMeasurementStore.h; sourceTree = "<group>"; };
 		5C826D6926D482EA008AEC91 /* PrivateClickMeasurementDatabase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrivateClickMeasurementDatabase.h; sourceTree = "<group>"; };
@@ -7236,6 +7236,8 @@
 				463FD4811EB94EAD00A2982C /* ProcessTerminationReason.h */,
 				517B5F94275EBA62002DC22D /* PushMessageForTesting.h */,
 				9B1229D023FF2A5E008CA751 /* RemoteAudioDestinationIdentifier.h */,
+				5C80B3DD23690F100086E6DE /* RemoteWorkerInitializationData.cpp */,
+				5C80B3DB23690D8D0086E6DE /* RemoteWorkerInitializationData.h */,
 				7203449B26A6C476000A5F54 /* RenderingUpdateID.h */,
 				5CB7AFE623C681B000E49CF3 /* ResourceLoadInfo.h */,
 				5C00993B2417FB7E00D53C25 /* ResourceLoadStatisticsParameters.h */,
@@ -7248,8 +7250,6 @@
 				E1E552C316AE065E004ED653 /* SandboxInitializationParameters.h */,
 				2D65D196274B8E84009C4101 /* ScrollingAccelerationCurve.cpp */,
 				2D65D195274B8E84009C4101 /* ScrollingAccelerationCurve.h */,
-				5C80B3DD23690F100086E6DE /* ServiceWorkerInitializationData.cpp */,
-				5C80B3DB23690D8D0086E6DE /* ServiceWorkerInitializationData.h */,
 				1AFDE6571954A42B00C48FFA /* SessionState.cpp */,
 				1AFDE6581954A42B00C48FFA /* SessionState.h */,
 				1A6420E212DCE2FF00CAAE2C /* ShareableBitmap.cpp */,

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp (289062 => 289063)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.cpp	2022-02-03 19:44:54 UTC (rev 289063)
@@ -35,9 +35,9 @@
 #include "NetworkProcessMessages.h"
 #include "RemoteWebLockRegistry.h"
 #include "RemoteWorkerFrameLoaderClient.h"
+#include "RemoteWorkerInitializationData.h"
 #include "RemoteWorkerLibWebRTCProvider.h"
 #include "ServiceWorkerFetchTaskMessages.h"
-#include "ServiceWorkerInitializationData.h"
 #include "WebBroadcastChannelRegistry.h"
 #include "WebCacheStorageProvider.h"
 #include "WebCompiledContentRuleListData.h"
@@ -76,7 +76,7 @@
 using namespace PAL;
 using namespace WebCore;
 
-WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, WebCore::RegistrableDomain&& registrableDomain, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, PageGroupIdentifier pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, ServiceWorkerInitializationData&& initializationData)
+WebSWContextManagerConnection::WebSWContextManagerConnection(Ref<IPC::Connection>&& connection, WebCore::RegistrableDomain&& registrableDomain, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, PageGroupIdentifier pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, RemoteWorkerInitializationData&& initializationData)
     : m_connectionToNetworkProcess(WTFMove(connection))
     , m_registrableDomain(WTFMove(registrableDomain))
     , m_serviceWorkerPageIdentifier(serviceWorkerPageIdentifier)

Modified: trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h (289062 => 289063)


--- trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/WebProcess/Storage/WebSWContextManagerConnection.h	2022-02-03 19:44:54 UTC (rev 289063)
@@ -57,11 +57,11 @@
 
 class RemoteWorkerFrameLoaderClient;
 class WebUserContentController;
-struct ServiceWorkerInitializationData;
+struct RemoteWorkerInitializationData;
 
 class WebSWContextManagerConnection final : public WebCore::SWContextManager::Connection, public IPC::MessageReceiver {
 public:
-    WebSWContextManagerConnection(Ref<IPC::Connection>&&, WebCore::RegistrableDomain&&, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, PageGroupIdentifier, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, ServiceWorkerInitializationData&&);
+    WebSWContextManagerConnection(Ref<IPC::Connection>&&, WebCore::RegistrableDomain&&, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, PageGroupIdentifier, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, RemoteWorkerInitializationData&&);
     ~WebSWContextManagerConnection();
 
     void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final;

Modified: trunk/Source/WebKit/WebProcess/WebProcess.cpp (289062 => 289063)


--- trunk/Source/WebKit/WebProcess/WebProcess.cpp	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/WebProcess/WebProcess.cpp	2022-02-03 19:44:54 UTC (rev 289063)
@@ -1920,7 +1920,7 @@
 }
 
 #if ENABLE(SERVICE_WORKER)
-void WebProcess::establishServiceWorkerContextConnectionToNetworkProcess(PageGroupIdentifier pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, RegistrableDomain&& registrableDomain, std::optional<ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, ServiceWorkerInitializationData&& initializationData, CompletionHandler<void()>&& completionHandler)
+void WebProcess::establishServiceWorkerContextConnectionToNetworkProcess(PageGroupIdentifier pageGroupID, WebPageProxyIdentifier webPageProxyID, PageIdentifier pageID, const WebPreferencesStore& store, RegistrableDomain&& registrableDomain, std::optional<ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, RemoteWorkerInitializationData&& initializationData, CompletionHandler<void()>&& completionHandler)
 {
     // We are in the Service Worker context process and the call below establishes our connection to the Network Process
     // by calling ensureNetworkProcessConnection. SWContextManager needs to use the same underlying IPC::Connection as the

Modified: trunk/Source/WebKit/WebProcess/WebProcess.h (289062 => 289063)


--- trunk/Source/WebKit/WebProcess/WebProcess.h	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/WebProcess/WebProcess.h	2022-02-03 19:44:54 UTC (rev 289063)
@@ -128,7 +128,6 @@
 class RemoteLegacyCDMFactory;
 class RemoteMediaEngineConfigurationFactory;
 class RemoteWebLockRegistry;
-struct ServiceWorkerInitializationData;
 class StorageAreaMap;
 class UserData;
 class WaylandCompositorDisplay;
@@ -144,13 +143,14 @@
 class WebLoaderStrategy;
 class WebPage;
 class WebPageGroupProxy;
+class WebProcessSupplement;
+
 struct GPUProcessConnectionInfo;
 struct GPUProcessConnectionParameters;
+struct RemoteWorkerInitializationData;
 struct UserMessage;
 struct WebProcessCreationParameters;
 struct WebProcessDataStoreParameters;
-class WebProcessSupplement;
-enum class WebsiteDataType : uint32_t;
 struct WebPageCreationParameters;
 struct WebPageGroupData;
 struct WebPreferencesStore;
@@ -157,6 +157,8 @@
 struct WebsiteData;
 struct WebsiteDataStoreParameters;
 
+enum class WebsiteDataType : uint32_t;
+
 #if PLATFORM(IOS_FAMILY)
 class LayerHostingContext;
 #endif
@@ -470,7 +472,7 @@
 #endif
 
 #if ENABLE(SERVICE_WORKER)
-    void establishServiceWorkerContextConnectionToNetworkProcess(PageGroupIdentifier, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, WebCore::RegistrableDomain&&, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, ServiceWorkerInitializationData&&, CompletionHandler<void()>&&);
+    void establishServiceWorkerContextConnectionToNetworkProcess(PageGroupIdentifier, WebPageProxyIdentifier, WebCore::PageIdentifier, const WebPreferencesStore&, WebCore::RegistrableDomain&&, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, RemoteWorkerInitializationData&&, CompletionHandler<void()>&&);
 #endif
 
     void fetchWebsiteData(OptionSet<WebsiteDataType>, CompletionHandler<void(WebsiteData&&)>&&);

Modified: trunk/Source/WebKit/WebProcess/WebProcess.messages.in (289062 => 289063)


--- trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2022-02-03 19:18:09 UTC (rev 289062)
+++ trunk/Source/WebKit/WebProcess/WebProcess.messages.in	2022-02-03 19:44:54 UTC (rev 289063)
@@ -101,7 +101,7 @@
 #endif
 
 #if ENABLE(SERVICE_WORKER)
-    EstablishServiceWorkerContextConnectionToNetworkProcess(WebKit::PageGroupIdentifier pageGroupID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier pageID, struct WebKit::WebPreferencesStore store, WebCore::RegistrableDomain domain, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, struct WebKit::ServiceWorkerInitializationData initializationData) -> () Async
+    EstablishServiceWorkerContextConnectionToNetworkProcess(WebKit::PageGroupIdentifier pageGroupID, WebKit::WebPageProxyIdentifier webPageProxyID, WebCore::PageIdentifier pageID, struct WebKit::WebPreferencesStore store, WebCore::RegistrableDomain domain, std::optional<WebCore::ScriptExecutionContextIdentifier> serviceWorkerPageIdentifier, struct WebKit::RemoteWorkerInitializationData initializationData) -> () Async
 #endif
 
     SetHasSuspendedPageProxy(bool hasSuspendedPageProxy);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to