Changeset 248862 in webkit


Ignore:
Timestamp:
Aug 19, 2019, 1:56:08 PM (6 years ago)
Author:
achristensen@apple.com
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):

Location:
trunk/Source/WebKit
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r248861 r248862  
     12019-08-19  Alex Christensen  <achristensen@webkit.org>
     2
     3        Move call to initializeMainThread introduced in r248549 to after WebKit.framework has been loaded
     4        https://bugs.webkit.org/show_bug.cgi?id=200896
     5        <rdar://problem/54479065>
     6
     7        Reviewed by Chris Dumez.
     8
     9        In XPCServiceMain we haven't been told which WebKit.framework to load yet, so when using staged frameworks it
     10        causes problems if we call a function from a WebKit framework.  We need to wait until after initializerFunctionPtr is called.
     11
     12        * NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm:
     13        (NetworkServiceInitializer):
     14        * PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm:
     15        (PluginServiceInitializer):
     16        * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
     17        (WebKit::XPCServiceMain):
     18        * WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm:
     19        (WebContentServiceInitializer):
     20
    1212019-08-19  Yusuke Suzuki  <ysuzuki@apple.com>
    222
  • trunk/Source/WebKit/NetworkProcess/EntryPoint/Cocoa/XPCService/NetworkServiceEntryPoint.mm

    r242292 r248862  
    5555void NetworkServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage)
    5656{
     57    WTF::initializeMainThread();
     58
    5759    // Remove the SecItemShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
    5860    // the this process don't try to insert the shim and crash.
  • trunk/Source/WebKit/PluginProcess/EntryPoint/Cocoa/XPCService/PluginServiceEntryPoint.mm

    r242292 r248862  
    7575{
    7676#if ENABLE(NETSCAPE_PLUGIN_API)
     77    WTF::initializeMainThread();
     78
    7779    // FIXME: Add support for teardown from PluginProcessMain.mm
    7880
  • trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm

    r248549 r248862  
    145145#endif
    146146
    147     WTF::initializeMainThread();
    148 
    149147    xpc_main(XPCServiceEventHandler);
    150148    return 0;
  • trunk/Source/WebKit/WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm

    r242292 r248862  
    4040void WebContentServiceInitializer(xpc_connection_t connection, xpc_object_t initializerMessage, xpc_object_t priorityBoostMessage)
    4141{
     42    WTF::initializeMainThread();
     43
    4244    // Remove the WebProcessShim from the DYLD_INSERT_LIBRARIES environment variable so any processes spawned by
    4345    // the this process don't try to insert the shim and crash.
Note: See TracChangeset for help on using the changeset viewer.