Title: [236810] trunk/Source/WebKit
Revision
236810
Author
[email protected]
Date
2018-10-03 14:02:19 -0700 (Wed, 03 Oct 2018)

Log Message

[Cocoa] REGRESSION: web content process paused in debugger is considered to be unresponsive if WebKit client is sandboxed
https://bugs.webkit.org/show_bug.cgi?id=190256
<rdar://problem/44957921>

Reviewed by Alexey Proskuryakov.

Instead of giving up when the client is sandboxed, check whether it has the
exception that's necessary to get process information. If it is possible,
proceed to check whether the web content process has a debugger attached.

* UIProcess/Cocoa/WebProcessProxyCocoa.mm:
(WebKit::WebProcessProxy::platformIsBeingDebugged const):
Check 'process-info-pidinfo' to see if the sysctl call would be allowed.

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (236809 => 236810)


--- trunk/Source/WebKit/ChangeLog	2018-10-03 20:54:17 UTC (rev 236809)
+++ trunk/Source/WebKit/ChangeLog	2018-10-03 21:02:19 UTC (rev 236810)
@@ -1,3 +1,19 @@
+2018-10-03  Brian Burg  <[email protected]>
+
+        [Cocoa] REGRESSION: web content process paused in debugger is considered to be unresponsive if WebKit client is sandboxed
+        https://bugs.webkit.org/show_bug.cgi?id=190256
+        <rdar://problem/44957921>
+
+        Reviewed by Alexey Proskuryakov.
+
+        Instead of giving up when the client is sandboxed, check whether it has the
+        exception that's necessary to get process information. If it is possible,
+        proceed to check whether the web content process has a debugger attached.
+
+        * UIProcess/Cocoa/WebProcessProxyCocoa.mm:
+        (WebKit::WebProcessProxy::platformIsBeingDebugged const):
+        Check 'process-info-pidinfo' to see if the sysctl call would be allowed.
+
 2018-10-03  Michael Catanzaro  <[email protected]>
 
         [WPE][GTK] Enable MSE by default

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm (236809 => 236810)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2018-10-03 20:54:17 UTC (rev 236809)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm	2018-10-03 21:02:19 UTC (rev 236810)
@@ -37,6 +37,7 @@
 #import "WebProcessPool.h"
 #import <sys/sysctl.h>
 #import <wtf/NeverDestroyed.h>
+#import <wtf/spi/darwin/SandboxSPI.h>
 
 namespace WebKit {
 
@@ -135,8 +136,8 @@
 
 bool WebProcessProxy::platformIsBeingDebugged() const
 {
-    // If the UI process is sandboxed, it cannot find out whether other processes are being debugged.
-    if (currentProcessIsSandboxed())
+    // If the UI process is sandboxed and lacks 'process-info-pidinfo', it cannot find out whether other processes are being debugged.
+    if (currentProcessIsSandboxed() && !!sandbox_check(getpid(), "process-info-pidinfo", SANDBOX_CHECK_NO_REPORT))
         return false;
 
     struct kinfo_proc info;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to