REGRESSION(251087): Several API tests are failing
authorpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Oct 2019 01:03:59 +0000 (01:03 +0000)
committerpvollan@apple.com <pvollan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 Oct 2019 01:03:59 +0000 (01:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=202961

Reviewed by Brent Fulgham.

WebPageProxy::maybeInitializeSandboxExtensionHandle returns early if the WebContent process is currently launching,
since the audit token is needed to create the sandbox extension. The audit token will not be available until the
process has finished launching. In the same way, the method should return early if the WebContent process has
terminated.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@251116 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.cpp

index 1b40757..80d2724 100644 (file)
@@ -1,3 +1,18 @@
+2019-10-14  Per Arne Vollan  <pvollan@apple.com>
+
+        REGRESSION(251087): Several API tests are failing
+        https://bugs.webkit.org/show_bug.cgi?id=202961
+
+        Reviewed by Brent Fulgham.
+
+        WebPageProxy::maybeInitializeSandboxExtensionHandle returns early if the WebContent process is currently launching,
+        since the audit token is needed to create the sandbox extension. The audit token will not be available until the
+        process has finished launching. In the same way, the method should return early if the WebContent process has
+        terminated.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
+
 2019-10-14  Matt Mokary  <mmokary@apple.com>
 
         FindController::findString always updates foundStringMatchIndex even if match is the same as before
index 0152f6c..e1c5c10 100644 (file)
@@ -1091,7 +1091,7 @@ void WebPageProxy::maybeInitializeSandboxExtensionHandle(WebProcessProxy& proces
 #if HAVE(SANDBOX_ISSUE_READ_EXTENSION_TO_PROCESS_BY_AUDIT_TOKEN)
     // If the process is still launching then it does not have a PID yet. We will take care of creating the sandbox extension
     // once the process has finished launching.
-    if (process.isLaunching())
+    if (process.isLaunching() || process.wasTerminated())
         return;
 #endif