Title: [275244] trunk/Source/WebKit
Revision
275244
Author
commit-qu...@webkit.org
Date
2021-03-30 16:00:38 -0700 (Tue, 30 Mar 2021)

Log Message

REGRESSION (r275172): Many com.apple.WebKit.Networking.Development crashes appearing in "other crashes"
https://bugs.webkit.org/show_bug.cgi?id=223952

Patch by Alex Christensen <achristen...@webkit.org> on 2021-03-30
Reviewed by Geoffrey Garen.

Use OS_REASON_FLAG_NO_CRASH_REPORT to prevent crash reports.  xpc_connection_kill didn't generate crash reports.

* Platform/IPC/cocoa/ConnectionCocoa.mm:
(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
(IPC::Connection::kill):
* Platform/spi/Cocoa/ReasonSPI.h:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::ProcessLauncher::platformInvalidate):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (275243 => 275244)


--- trunk/Source/WebKit/ChangeLog	2021-03-30 22:46:57 UTC (rev 275243)
+++ trunk/Source/WebKit/ChangeLog	2021-03-30 23:00:38 UTC (rev 275244)
@@ -1,3 +1,19 @@
+2021-03-30  Alex Christensen  <achristen...@webkit.org>
+
+        REGRESSION (r275172): Many com.apple.WebKit.Networking.Development crashes appearing in "other crashes"
+        https://bugs.webkit.org/show_bug.cgi?id=223952
+
+        Reviewed by Geoffrey Garen.
+
+        Use OS_REASON_FLAG_NO_CRASH_REPORT to prevent crash reports.  xpc_connection_kill didn't generate crash reports.
+
+        * Platform/IPC/cocoa/ConnectionCocoa.mm:
+        (IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
+        (IPC::Connection::kill):
+        * Platform/spi/Cocoa/ReasonSPI.h:
+        * UIProcess/Launcher/mac/ProcessLauncherMac.mm:
+        (WebKit::ProcessLauncher::platformInvalidate):
+
 2021-03-30  Brent Fulgham  <bfulg...@apple.com>
 
         [macOS] Reduce logging for uninteresting sandbox violations

Modified: trunk/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm (275243 => 275244)


--- trunk/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm	2021-03-30 22:46:57 UTC (rev 275243)
+++ trunk/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm	2021-03-30 23:00:38 UTC (rev 275244)
@@ -97,7 +97,7 @@
     
     void watchdogTimerFired()
     {
-        terminate_with_reason(xpc_connection_get_pid(m_xpcConnection.get()), OS_REASON_WEBKIT, static_cast<uint64_t>(WebKit::ReasonCode::WatchdogTimerFired), "ConnectionTerminationWatchdog::watchdogTimerFired", 0);
+        terminate_with_reason(xpc_connection_get_pid(m_xpcConnection.get()), OS_REASON_WEBKIT, static_cast<uint64_t>(WebKit::ReasonCode::WatchdogTimerFired), "ConnectionTerminationWatchdog::watchdogTimerFired", OS_REASON_FLAG_NO_CRASH_REPORT);
         delete this;
     }
 
@@ -608,7 +608,7 @@
 bool Connection::kill()
 {
     if (m_xpcConnection) {
-        terminate_with_reason(xpc_connection_get_pid(m_xpcConnection.get()), OS_REASON_WEBKIT, static_cast<uint64_t>(WebKit::ReasonCode::ConnectionKilled), "Connection::kill", 0);
+        terminate_with_reason(xpc_connection_get_pid(m_xpcConnection.get()), OS_REASON_WEBKIT, static_cast<uint64_t>(WebKit::ReasonCode::ConnectionKilled), "Connection::kill", OS_REASON_FLAG_NO_CRASH_REPORT);
         m_wasKilled = true;
         return true;
     }

Modified: trunk/Source/WebKit/Platform/spi/Cocoa/ReasonSPI.h (275243 => 275244)


--- trunk/Source/WebKit/Platform/spi/Cocoa/ReasonSPI.h	2021-03-30 22:46:57 UTC (rev 275243)
+++ trunk/Source/WebKit/Platform/spi/Cocoa/ReasonSPI.h	2021-03-30 23:00:38 UTC (rev 275244)
@@ -46,6 +46,8 @@
 }
 #endif
 
+#define OS_REASON_FLAG_NO_CRASH_REPORT 0x1
+
 #define OS_REASON_WEBKIT 31
 
 #endif

Modified: trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm (275243 => 275244)


--- trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2021-03-30 22:46:57 UTC (rev 275243)
+++ trunk/Source/WebKit/UIProcess/Launcher/mac/ProcessLauncherMac.mm	2021-03-30 23:00:38 UTC (rev 275244)
@@ -337,7 +337,7 @@
         return;
 
     xpc_connection_cancel(m_xpcConnection.get());
-    terminate_with_reason(xpc_connection_get_pid(m_xpcConnection.get()), OS_REASON_WEBKIT, static_cast<uint64_t>(WebKit::ReasonCode::Invalidation), "ProcessLauncher::platformInvalidate", 0);
+    terminate_with_reason(xpc_connection_get_pid(m_xpcConnection.get()), OS_REASON_WEBKIT, static_cast<uint64_t>(WebKit::ReasonCode::Invalidation), "ProcessLauncher::platformInvalidate", OS_REASON_FLAG_NO_CRASH_REPORT);
     m_xpcConnection = nullptr;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to