mac: Fix crash reporting on Yosemite
This commit is contained in:
parent
85cf8f9174
commit
ba347f6460
2 changed files with 14 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
#include "atom/common/crash_reporter/crash_reporter_mac.h"
|
#include "atom/common/crash_reporter/crash_reporter_mac.h"
|
||||||
|
|
||||||
|
#include "base/mac/mac_util.h"
|
||||||
#include "base/memory/singleton.h"
|
#include "base/memory/singleton.h"
|
||||||
#include "base/strings/sys_string_conversions.h"
|
#include "base/strings/sys_string_conversions.h"
|
||||||
#import "vendor/breakpad/src/client/apple/Framework/BreakpadDefines.h"
|
#import "vendor/breakpad/src/client/apple/Framework/BreakpadDefines.h"
|
||||||
|
@ -54,7 +55,19 @@ void CrashReporterMac::InitBreakpad(const std::string& product_name,
|
||||||
[parameters setValue:base::SysUTF8ToNSString(dump_dir)
|
[parameters setValue:base::SysUTF8ToNSString(dump_dir)
|
||||||
forKey:@BREAKPAD_DUMP_DIRECTORY];
|
forKey:@BREAKPAD_DUMP_DIRECTORY];
|
||||||
|
|
||||||
|
// Temporarily run Breakpad in-process on 10.10 and later because APIs that
|
||||||
|
// it depends on got broken (http://crbug.com/386208).
|
||||||
|
// This can catch crashes in the browser process only.
|
||||||
|
if (base::mac::IsOSYosemiteOrLater()) {
|
||||||
|
[parameters setObject:[NSNumber numberWithBool:YES]
|
||||||
|
forKey:@BREAKPAD_IN_PROCESS];
|
||||||
|
}
|
||||||
|
|
||||||
breakpad_ = BreakpadCreate(parameters);
|
breakpad_ = BreakpadCreate(parameters);
|
||||||
|
if (!breakpad_) {
|
||||||
|
LOG(ERROR) << "Failed to initialize breakpad";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (StringMap::const_iterator iter = upload_parameters_.begin();
|
for (StringMap::const_iterator iter = upload_parameters_.begin();
|
||||||
iter != upload_parameters_.end(); ++iter) {
|
iter != upload_parameters_.end(); ++iter) {
|
||||||
|
|
2
vendor/breakpad
vendored
2
vendor/breakpad
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 2483f32da1f729ac362fbbcaa9173843379697e9
|
Subproject commit b07fb51bdb232fee33711e3eb48cb56dd3c257e3
|
Loading…
Add table
Reference in a new issue