Title: [248862] trunk/Source/WebKit
Revision
248862
Author
achristen...@apple.com
Date
2019-08-19 13:56:08 -0700 (Mon, 19 Aug 2019)

Log Message

Move call to initializeMainThread introduced in r248549 to after WebKit.framework has been loaded
https://bugs.webkit.org/show_bug.cgi?id=200896
<rdar://problem/54479065>

Reviewed by Chris Dumez.

In XPCServiceMain we haven't been told which WebKit.framework to load yet, so when using staged frameworks it
causes problems if we call a function from a WebKit framework.  We need to wait until after initializerFunctionPtr is called.

* NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm:
(NetworkServiceInitializer):
* PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm:
(PluginServiceInitializer):
* Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceMain):
* WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (248861 => 248862)


--- trunk/Source/WebKit/ChangeLog	2019-08-19 20:12:44 UTC (rev 248861)
+++ trunk/Source/WebKit/ChangeLog	2019-08-19 20:56:08 UTC (rev 248862)
@@ -1,3 +1,23 @@
+2019-08-19  Alex Christensen  <achristen...@webkit.org>
+
+        Move call to initializeMainThread introduced in r248549 to after WebKit.framework has been loaded
+        https://bugs.webkit.org/show_bug.cgi?id=200896
+        <rdar://problem/54479065>
+
+        Reviewed by Chris Dumez.
+
+        In XPCServiceMain we haven't been told which WebKit.framework to load yet, so when using staged frameworks it
+        causes problems if we call a function from a WebKit framework.  We need to wait until after initializerFunctionPtr is called.
+
+        * NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm:
+        (NetworkServiceInitializer):
+        * PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm:
+        (PluginServiceInitializer):
+        * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
+        (WebKit::XPCServiceMain):
+        * WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm:
+        (WebContentServiceInitializer):
+
 2019-08-19  Yusuke Suzuki  <ysuz...@apple.com>
 
         Unreviewed, build fix for PLATFORM_DRIVEN_TEXT_CHECKING

Modified: trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm (248861 => 248862)


--- trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm	2019-08-19 20:12:44 UTC (rev 248861)
+++ trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm	2019-08-19 20:56:08 UTC (rev 248862)
@@ -54,6 +54,8 @@
 
 void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage)
 {
+    WTF::initializeMainThread();
+
     // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
     // the this process don't try to insert the shim and crash.
     EnvironmentUtilities::removeValuesEndingWith("DYLD_INSERT_LIBRARIES", "/SecItemShim.dylib");

Modified: trunk/Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm (248861 => 248862)


--- trunk/Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm	2019-08-19 20:12:44 UTC (rev 248861)
+++ trunk/Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm	2019-08-19 20:56:08 UTC (rev 248862)
@@ -74,6 +74,8 @@
 void PluginServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage)
 {
 #if ENABLE(NETSCAPE_PLUGIN_API)
+    WTF::initializeMainThread();
+
     // FIXME: Add support for teardown from PluginProcessMain.mm
 
     // Remove the PluginProcess shim from the DYLD_INSERT_LIBRARIES environment variable so any processes

Modified: trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm (248861 => 248862)


--- trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2019-08-19 20:12:44 UTC (rev 248861)
+++ trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm	2019-08-19 20:56:08 UTC (rev 248862)
@@ -144,8 +144,6 @@
 #endif
 #endif
 
-    WTF::initializeMainThread();
-
     xpc_main(XPCServiceEventHandler);
     return 0;
 }

Modified: trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm (248861 => 248862)


--- trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm	2019-08-19 20:12:44 UTC (rev 248861)
+++ trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm	2019-08-19 20:56:08 UTC (rev 248862)
@@ -39,6 +39,8 @@
 
 void WebContentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage)
 {
+    WTF::initializeMainThread();
+
     // Remove the WebProcessShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
     // the this process don't try to insert the shim and crash.
     WebKit::EnvironmentUtilities::removeValuesEndingWith("DYLD_INSERT_LIBRARIES", "/WebProcessShim.dylib");
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to