Changeset 231984 in webkit


Ignore:
Timestamp:
May 18, 2018 3:28:09 PM (6 years ago)
Author:
pvollan@apple.com
Message:

WebProcess fails to launch
https://bugs.webkit.org/show_bug.cgi?id=185140

Reviewed by Geoffrey Garen.

If the NSApplication runloop is not used in the WebContent process, launchServicesCheckIn() needs to be called
in order for enableSandboxStyleFileQuarantine() to succeed. Determine at runtime if launchServicesCheckIn()
should be called by checking if the NSApplication event loop is running.

  • WebProcess/cocoa/WebProcessCocoa.mm:

(WebKit::WebProcess::platformInitializeProcess):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r231982 r231984  
     12018-05-18  Per Arne Vollan  <pvollan@apple.com>
     2
     3        WebProcess fails to launch
     4        https://bugs.webkit.org/show_bug.cgi?id=185140
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        If the NSApplication runloop is not used in the WebContent process, launchServicesCheckIn() needs to be called
     9        in order for enableSandboxStyleFileQuarantine() to succeed. Determine at runtime if launchServicesCheckIn()
     10        should be called by checking if the NSApplication event loop is running.
     11
     12        * WebProcess/cocoa/WebProcessCocoa.mm:
     13        (WebKit::WebProcess::platformInitializeProcess):
     14
    1152018-05-18  Jer Noble  <jer.noble@apple.com>
    216
  • trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

    r231389 r231984  
    307307    CGSShutdownServerConnections();
    308308#else
    309 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
    310     // This call is needed when the WebProcess is not running the NSApplication event loop.
    311     // Otherwise, calling enableSandboxStyleFileQuarantine() will fail.
    312     launchServicesCheckIn();
    313 #endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     309    if (![NSApp isRunning]) {
     310        // This call is needed when the WebProcess is not running the NSApplication event loop.
     311        // Otherwise, calling enableSandboxStyleFileQuarantine() will fail.
     312        launchServicesCheckIn();
     313    }
    314314#endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
    315315#endif // PLATFORM(MAC)
Note: See TracChangeset for help on using the changeset viewer.