Service Worker Process does not have the right domain name
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Apr 2019 17:44:16 +0000 (17:44 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 4 Apr 2019 17:44:16 +0000 (17:44 +0000)
https://bugs.webkit.org/show_bug.cgi?id=196585

Reviewed by Chris Dumez.

* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
Updated extraInitializationData to go from "security-origin" to "registrable-domain".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243880 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm

index 1662d4b..0d20e9f 100644 (file)
@@ -1,3 +1,14 @@
+2019-04-04  Youenn Fablet  <youenn@apple.com>
+
+        Service Worker Process does not have the right domain name
+        https://bugs.webkit.org/show_bug.cgi?id=196585
+
+        Reviewed by Chris Dumez.
+
+        * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm:
+        (WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
+        Updated extraInitializationData to go from "security-origin" to "registrable-domain".
+
 2019-04-04  Chris Dumez  <cdumez@apple.com>
 
         Temporarily disable delayed WebProcess launch on iOS to address PLT regression
index 1cf0edb..59ff501 100644 (file)
@@ -118,17 +118,16 @@ bool XPCServiceInitializerDelegate::getExtraInitializationData(HashMap<String, S
 #if ENABLE(SERVICE_WORKER)
     String serviceWorkerProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "service-worker-process");
     if (!serviceWorkerProcess.isEmpty())
-        extraInitializationData.add("service-worker-process"_s, serviceWorkerProcess);
+        extraInitializationData.add("service-worker-process"_s, WTFMove(serviceWorkerProcess));
+    String registrableDomain = xpc_dictionary_get_string(extraDataInitializationDataObject, "registrable-domain");
+    if (!registrableDomain.isEmpty())
+        extraInitializationData.add("registrable-domain"_s, WTFMove(registrableDomain));
 #endif
 
     String isPrewarmedProcess = xpc_dictionary_get_string(extraDataInitializationDataObject, "is-prewarmed");
     if (!isPrewarmedProcess.isEmpty())
         extraInitializationData.add("is-prewarmed"_s, isPrewarmedProcess);
 
-    String securityOrigin = xpc_dictionary_get_string(extraDataInitializationDataObject, "security-origin");
-    if (!securityOrigin.isEmpty())
-        extraInitializationData.add("security-origin"_s, securityOrigin);
-
     if (!isClientSandboxed()) {
         String userDirectorySuffix = xpc_dictionary_get_string(extraDataInitializationDataObject, "user-directory-suffix");
         if (!userDirectorySuffix.isEmpty())