From bf330448d462fd6fd9199ad2a7b33080974c88ba Mon Sep 17 00:00:00 2001 From: erikchen Date: Wed, 24 Sep 2014 14:47:04 -0700 Subject: [PATCH] Mac: Revert "Make logic for disabling OS crash catcher on OSX match comment." This CL breaks chrome://inducebrowsercrashforrealz I don't know exactly why the behavior is broken, but it appears that setting a signal handler for SIGTRAP interferes with breakpad exception handling. See bug for more details. Original CL: https://codereview.chromium.org/329423003 Original Commit: d81d222cb0d4d83436e1723f697951deaf68fdfa TBR=cpu@chromium.org BUG=402337 Review URL: https://codereview.chromium.org/602793002 Cr-Commit-Position: refs/heads/master@{#296530} --- chrome/app/chrome_main_delegate.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index 3449188abfdf..65b84663227e 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc @@ -568,10 +568,12 @@ void ChromeMainDelegate::InitMacCrashReporter( // itself. // * If Breakpad is disabled, we only turn on Crash Reporter for the // Browser process in release mode. - if (base::mac::IsBackgroundOnlyProcess() || - breakpad::IsCrashReporterEnabled() || - is_debug_build) { - base::mac::DisableOSCrashDumps(); + if (!command_line.HasSwitch(switches::kDisableBreakpad)) { + bool disable_apple_crash_reporter = is_debug_build || + base::mac::IsBackgroundOnlyProcess(); + if (!breakpad::IsCrashReporterEnabled() && disable_apple_crash_reporter) { + base::mac::DisableOSCrashDumps(); + } } // Mac Chrome is packaged with a main app bundle and a helper app bundle. -- 2.11.4.GIT