Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: components/crash/app/breakpad_mac.mm

Issue 571663002: Mac: Configure Breakpad to run in-process on Yosemite. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « breakpad/breakpad.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "components/crash/app/breakpad_mac.h" 5 #import "components/crash/app/breakpad_mac.h"
6 6
7 #include <CoreFoundation/CoreFoundation.h> 7 #include <CoreFoundation/CoreFoundation.h>
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // when the application crashes, and provide the user with the option to 211 // when the application crashes, and provide the user with the option to
212 // restart it. 212 // restart it.
213 if (is_browser) 213 if (is_browser)
214 [breakpad_config setObject:@"NO" forKey:@BREAKPAD_SEND_AND_EXIT]; 214 [breakpad_config setObject:@"NO" forKey:@BREAKPAD_SEND_AND_EXIT];
215 215
216 base::FilePath dir_crash_dumps; 216 base::FilePath dir_crash_dumps;
217 GetBreakpadClient()->GetCrashDumpLocation(&dir_crash_dumps); 217 GetBreakpadClient()->GetCrashDumpLocation(&dir_crash_dumps);
218 [breakpad_config setObject:base::SysUTF8ToNSString(dir_crash_dumps.value()) 218 [breakpad_config setObject:base::SysUTF8ToNSString(dir_crash_dumps.value())
219 forKey:@BREAKPAD_DUMP_DIRECTORY]; 219 forKey:@BREAKPAD_DUMP_DIRECTORY];
220 220
221 // Temporarily run Breakpad in-process on 10.10 and later because APIs that
222 // it depends on got broken (http://crbug.com/386208).
223 // This can catch crashes in the browser process only.
224 [breakpad_config setObject:@(base::mac::IsOSYosemiteOrLater())
Mark Mentovai 2014/09/12 21:52:20 1. Can we avoid setting this key altogether if we’
Andre 2014/09/12 23:00:13 Done.
225 forKey:@BREAKPAD_IN_PROCESS];
226
221 // Initialize Breakpad. 227 // Initialize Breakpad.
222 gBreakpadRef = BreakpadCreate(breakpad_config); 228 gBreakpadRef = BreakpadCreate(breakpad_config);
223 if (!gBreakpadRef) { 229 if (!gBreakpadRef) {
224 LOG_IF(ERROR, base::mac::AmIBundled()) << "Breakpad initializaiton failed"; 230 LOG_IF(ERROR, base::mac::AmIBundled()) << "Breakpad initializaiton failed";
225 return; 231 return;
226 } 232 }
227 233
228 // Initialize the scoped crash key system. 234 // Initialize the scoped crash key system.
229 base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueImpl, 235 base::debug::SetCrashKeyReportingFunctions(&SetCrashKeyValueImpl,
230 &ClearCrashKeyValueImpl); 236 &ClearCrashKeyValueImpl);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 276
271 // Store process type in crash dump. 277 // Store process type in crash dump.
272 SetCrashKeyValue(@"ptype", process_type); 278 SetCrashKeyValue(@"ptype", process_type);
273 279
274 NSString* pid_value = 280 NSString* pid_value =
275 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())]; 281 [NSString stringWithFormat:@"%d", static_cast<unsigned int>(getpid())];
276 SetCrashKeyValue(@"pid", pid_value); 282 SetCrashKeyValue(@"pid", pid_value);
277 } 283 }
278 284
279 } // namespace breakpad 285 } // namespace breakpad
OLDNEW
« no previous file with comments | « breakpad/breakpad.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698