Add instrumentation for when we fail to receive a message
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2017 23:23:06 +0000 (23:23 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Jan 2017 23:23:06 +0000 (23:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=167179

Reviewed by Alexey Proskuryakov.

This will help us diagnose what the error from mach_msg is.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::readFromMachPort):

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

Source/WebKit2/ChangeLog
Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm

index 6eabcd5..51e49dc 100644 (file)
@@ -1,3 +1,15 @@
+2017-01-18  Anders Carlsson  <andersca@apple.com>
+
+        Add instrumentation for when we fail to receive a message
+        https://bugs.webkit.org/show_bug.cgi?id=167179
+
+        Reviewed by Alexey Proskuryakov.
+
+        This will help us diagnose what the error from mach_msg is.
+
+        * Platform/IPC/mac/ConnectionMac.mm:
+        (IPC::readFromMachPort):
+
 2017-01-18  Alex Christensen  <achristensen@webkit.org>
 
         Fix CFURLConnection build on Mac
index e3a3de5..d523398 100644 (file)
@@ -497,6 +497,9 @@ static mach_msg_header_t* readFromMachPort(mach_port_t machPort, ReceiveBuffer&
     }
 
     if (kr != MACH_MSG_SUCCESS) {
+#if !ASSERT_DISABLED
+        WKSetCrashReportApplicationSpecificInformation((CFStringRef)[NSString stringWithFormat:@"Unhandled error code %x from mach_msg", kr]);
+#endif
         ASSERT_NOT_REACHED();
         return 0;
     }