Title: [231984] trunk/Source/WebKit
Revision
231984
Author
pvol...@apple.com
Date
2018-05-18 15:28:09 -0700 (Fri, 18 May 2018)

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (231983 => 231984)


--- trunk/Source/WebKit/ChangeLog	2018-05-18 21:46:13 UTC (rev 231983)
+++ trunk/Source/WebKit/ChangeLog	2018-05-18 22:28:09 UTC (rev 231984)
@@ -1,3 +1,17 @@
+2018-05-18  Per Arne Vollan  <pvol...@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.no...@apple.com>
 
         Complete fix for enabling modern EME by default

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (231983 => 231984)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2018-05-18 21:46:13 UTC (rev 231983)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2018-05-18 22:28:09 UTC (rev 231984)
@@ -306,11 +306,11 @@
     // 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)
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to