| Index: components/crash/content/app/breakpad_mac.mm
|
| diff --git a/components/crash/content/app/breakpad_mac.mm b/components/crash/content/app/breakpad_mac.mm
|
| index 6c6934bfa7ea832e707bcdbaef9ceab1cdf0ebff..163e0283e31c43828ddf6338066af8f2f7880c8f 100644
|
| --- a/components/crash/content/app/breakpad_mac.mm
|
| +++ b/components/crash/content/app/breakpad_mac.mm
|
| @@ -73,8 +73,19 @@ void ClearCrashKeyValueImpl(const base::StringPiece& key) {
|
| }
|
| }
|
|
|
| -bool FatalMessageHandler(int severity, const char* file, int line,
|
| - size_t message_start, const std::string& str) {
|
| +class FatalMessageHandler : logging::LogMessageHandler {
|
| + bool OnMessage(int severity,
|
| + const char* file,
|
| + int line,
|
| + size_t message_start,
|
| + const std::string& str) override;
|
| +};
|
| +
|
| +bool FatalMessageHandler::OnMessage(int severity,
|
| + const char* file,
|
| + int line,
|
| + size_t message_start,
|
| + const std::string& str) {
|
| // Do not handle non-FATAL.
|
| if (severity != logging::LOG_FATAL)
|
| return false;
|
| @@ -264,7 +275,10 @@ void InitCrashReporter(const std::string& process_type) {
|
| SetCrashKeyValue(@"prod", [info_dictionary objectForKey:@BREAKPAD_PRODUCT]);
|
| SetCrashKeyValue(@"plat", @"OS X");
|
|
|
| - logging::SetLogMessageHandler(&FatalMessageHandler);
|
| + // Intentionally leak the handler.
|
| + auto* log_handler = new FatalMessageHandler();
|
| + CHECK(log_handler);
|
| +
|
| base::debug::SetDumpWithoutCrashingFunction(&DumpHelper::DumpWithoutCrashing);
|
|
|
| // abort() sends SIGABRT, which breakpad does not intercept.
|
|
|