Commit d81d222c authored by ncbray@chromium.org's avatar ncbray@chromium.org

Make logic for disabling OS crash catcher on OSX match comment.

As written, the code would only disable the OS crash reporter if
breakpad was not enabled, which is the opposite of the documented
behavior.

This change results in us calling base::mac::DisableOSCrashDumps() for
all processes where base::mac::IsBackgroundOnlyProcess() is true,
including NaCl processes. Before this change, the OS crash reporter
was triggered when NaCl processes crashed in untrusted code, which
would could take 40+ seconds to complete.

BUG=318501

Review URL: https://codereview.chromium.org/329423003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276928 0039d316-1c4b-4281-b951-d872f2087c98
parent 21bd4832
...@@ -579,12 +579,10 @@ void ChromeMainDelegate::InitMacCrashReporter( ...@@ -579,12 +579,10 @@ void ChromeMainDelegate::InitMacCrashReporter(
// itself. // itself.
// * If Breakpad is disabled, we only turn on Crash Reporter for the // * If Breakpad is disabled, we only turn on Crash Reporter for the
// Browser process in release mode. // Browser process in release mode.
if (!command_line.HasSwitch(switches::kDisableBreakpad)) { if (base::mac::IsBackgroundOnlyProcess() ||
bool disable_apple_crash_reporter = is_debug_build || breakpad::IsCrashReporterEnabled() ||
base::mac::IsBackgroundOnlyProcess(); is_debug_build) {
if (!breakpad::IsCrashReporterEnabled() && disable_apple_crash_reporter) { base::mac::DisableOSCrashDumps();
base::mac::DisableOSCrashDumps();
}
} }
// Mac Chrome is packaged with a main app bundle and a helper app bundle. // Mac Chrome is packaged with a main app bundle and a helper app bundle.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment