Skip to content
Permalink
Browse files
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):


Canonical link: https://commits.webkit.org/201252@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231984 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
pvollan committed May 18, 2018
1 parent 284124b commit e11c6c5b842b47871f99b67c2279d6859f6d86db
Showing with 19 additions and 5 deletions.
  1. +14 −0 Source/WebKit/ChangeLog
  2. +5 −5 Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm
@@ -1,3 +1,17 @@
2018-05-18 Per Arne Vollan <pvollan@apple.com>

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):

2018-05-18 Jer Noble <jer.noble@apple.com>

Complete fix for enabling modern EME by default
@@ -306,11 +306,11 @@ static void registerWithAccessibility()
// Make sure that we close any WindowServer connections after checking in with Launch Services.
CGSShutdownServerConnections();
#else
#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
// This call is needed when the WebProcess is not running the NSApplication event loop.
// Otherwise, calling enableSandboxStyleFileQuarantine() will fail.
launchServicesCheckIn();
#endif // __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
if (![NSApp isRunning]) {
// This call is needed when the WebProcess is not running the NSApplication event loop.
// Otherwise, calling enableSandboxStyleFileQuarantine() will fail.
launchServicesCheckIn();
}
#endif // ENABLE(WEBPROCESS_WINDOWSERVER_BLOCKING)
#endif // PLATFORM(MAC)

0 comments on commit e11c6c5

Please sign in to comment.