From d4386da6c31e9cd97022d31c7146866d35e65a4c Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Sun, 11 Apr 2021 20:34:41 -0400 Subject: [PATCH] chrome: mac: Fix exception_port_.is_valid() failure (see issue #2969) Fixes the following startup error: FATAL:crashpad_client_mac.cc(499) Check failed: exception_port_.is_valid() --- patch/patches/chrome_runtime.patch | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 60ec9d3eb..514552524 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -178,6 +178,31 @@ index 6a94d1ec0122..211aee12cb12 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { +diff --git chrome/browser/notifications/alert_dispatcher_xpc.mm chrome/browser/notifications/alert_dispatcher_xpc.mm +index d126ddd3a24d..5e8c5ae7c093 100644 +--- chrome/browser/notifications/alert_dispatcher_xpc.mm ++++ chrome/browser/notifications/alert_dispatcher_xpc.mm +@@ -19,6 +19,7 @@ + #include "base/mac/scoped_nsobject.h" + #include "base/metrics/histogram_functions.h" + #include "base/strings/sys_string_conversions.h" ++#include "cef/libcef/features/runtime.h" + #include "chrome/browser/notifications/notification_platform_bridge_mac_utils.h" + #import "chrome/browser/ui/cocoa/notifications/notification_delivery.h" + #include "chrome/browser/ui/cocoa/notifications/xpc_mach_port.h" +@@ -180,6 +181,12 @@ void RecordXPCEvent(XPCConnectionEvent event) { + - (id)serviceProxy { + id proxy = [_xpcConnection remoteObjectProxy]; + ++ // Skip exception port configuration when running CEF with crash reporting disabled. ++ if (!_setExceptionPort && cef::IsChromeRuntimeEnabled() && ++ !cef::IsCrashReportingEnabled()) { ++ _setExceptionPort = YES; ++ } ++ + if (!_setExceptionPort) { + base::mac::ScopedMachSendRight exceptionPort( + crash_reporter::GetCrashpadClient().GetHandlerMachPort()); diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc index 853eff92d210..2f66813e9b13 100644 --- chrome/browser/prefs/browser_prefs.cc