Title: [211443] trunk/Source/WebKit2
Revision
211443
Author
ander...@apple.com
Date
2017-01-31 12:25:46 -0800 (Tue, 31 Jan 2017)

Log Message

Add more CRASH calls to try to figure out why we're failing to send mach ports over the wire
https://bugs.webkit.org/show_bug.cgi?id=167657

Reviewed by Tim Horton.

* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::openFrontendConnection):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (211442 => 211443)


--- trunk/Source/WebKit2/ChangeLog	2017-01-31 19:49:34 UTC (rev 211442)
+++ trunk/Source/WebKit2/ChangeLog	2017-01-31 20:25:46 UTC (rev 211443)
@@ -1,3 +1,13 @@
+2017-01-31  Anders Carlsson  <ander...@apple.com>
+
+        Add more CRASH calls to try to figure out why we're failing to send mach ports over the wire
+        https://bugs.webkit.org/show_bug.cgi?id=167657
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/WebPage/WebInspector.cpp:
+        (WebKit::WebInspector::openFrontendConnection):
+
 2017-01-31  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Crash when trying to compute global location when the WKContentView does not have a window

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp (211442 => 211443)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp	2017-01-31 19:49:34 UTC (rev 211442)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebInspector.cpp	2017-01-31 20:25:46 UTC (rev 211443)
@@ -78,9 +78,12 @@
     IPC::Attachment connectionClientPort(socketPair.client);
 #elif OS(DARWIN)
     mach_port_t listeningPort;
-    mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort);
-    mach_port_insert_right(mach_task_self(), listeningPort, listeningPort, MACH_MSG_TYPE_MAKE_SEND);
+    if (mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort) != KERN_SUCCESS)
+        CRASH();
 
+    if (mach_port_insert_right(mach_task_self(), listeningPort, listeningPort, MACH_MSG_TYPE_MAKE_SEND) != KERN_SUCCESS)
+        CRASH();
+
     IPC::Connection::Identifier connectionIdentifier(listeningPort);
     IPC::Attachment connectionClientPort(listeningPort, MACH_MSG_TYPE_MOVE_SEND);
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to