Changeset 241235 in webkit


Ignore:
Timestamp:
Feb 8, 2019 11:04:47 PM (5 years ago)
Author:
achristensen@apple.com
Message:

Speculative fix for Mojave API test after r241223
https://bugs.webkit.org/show_bug.cgi?id=194427

  • Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:

(WebKit::XPCInitializationHandler):
(WebKit::XPCServiceMain):
Set the APPLEEVENTSSERVICENAME environment variable before handling any xpc messages like we used to.
I'll worry about making things right in the daemon later.

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r241232 r241235  
     12019-02-08  Alex Christensen  <achristensen@webkit.org>
     2
     3        Speculative fix for Mojave API test after r241223
     4        https://bugs.webkit.org/show_bug.cgi?id=194427
     5
     6        * Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm:
     7        (WebKit::XPCInitializationHandler):
     8        (WebKit::XPCServiceMain):
     9        Set the __APPLEEVENTSSERVICENAME environment variable before handling any xpc messages like we used to.
     10        I'll worry about making things right in the daemon later.
     11
    1122019-02-08  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceMain.mm

    r241223 r241235  
    109109    static std::once_flag once;
    110110    std::call_once(once, [event] {
    111 #if PLATFORM(MAC)
    112         // Don't allow Apple Events in WebKit processes. This can be removed when <rdar://problem/14012823> is fixed.
    113         setenv("__APPLEEVENTSSERVICENAME", "", 1);
    114 
    115 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
    116         // We don't need to talk to the dock.
    117         if (Class nsApplicationClass = NSClassFromString(@"NSApplication")) {
    118             if ([nsApplicationClass respondsToSelector:@selector(_preventDockConnections)])
    119                 [nsApplicationClass _preventDockConnections];
    120         }
    121 #endif
    122 #endif
    123 
    124111#if defined(__i386__)
    125112        // FIXME: This should only be done for the 32-bit plug-in XPC service so we rely on the fact that
     
    170157int XPCServiceMain(int, const char**)
    171158{
     159#if PLATFORM(MAC)
     160    // Don't allow Apple Events in WebKit processes. This can be removed when <rdar://problem/14012823> is fixed.
     161    setenv("__APPLEEVENTSSERVICENAME", "", 1);
     162   
     163#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     164    // We don't need to talk to the dock.
     165    if (Class nsApplicationClass = NSClassFromString(@"NSApplication")) {
     166        if ([nsApplicationClass respondsToSelector:@selector(_preventDockConnections)])
     167            [nsApplicationClass _preventDockConnections];
     168    }
     169#endif
     170#endif
     171
    172172    xpc_main([] (xpc_connection_t peer) {
    173173        XPCEventHandler(peer, AuxiliaryProcessType::XPCService);
Note: See TracChangeset for help on using the changeset viewer.