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

Unified Diff: components/crash/content/app/crashpad_mac.mm

Issue 2799013002: Monitor crashpad_handler for crashes [sometimes] (Closed)
Patch Set: Address review feedback (scottmg) Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/crash/content/app/crash_reporter_client.cc ('k') | components/crash/content/app/crashpad_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/content/app/crashpad_mac.mm
diff --git a/components/crash/content/app/crashpad_mac.mm b/components/crash/content/app/crashpad_mac.mm
index 2cabccb88d19c655afe3248ad10a3086b0afddce..3bae07e14c690869515c4ce233988addad12f1c1 100644
--- a/components/crash/content/app/crashpad_mac.mm
+++ b/components/crash/content/app/crashpad_mac.mm
@@ -66,12 +66,18 @@
base::SysNSStringToUTF8(product).append("_Mac");
#if defined(GOOGLE_CHROME_BUILD)
+ // Empty means stable.
+ const bool allow_empty_channel = true;
+#else
+ const bool allow_empty_channel = false;
+#endif
NSString* channel = base::mac::ObjCCast<NSString>(
[outer_bundle objectForInfoDictionaryKey:@"KSChannelID"]);
if (channel) {
process_annotations["channel"] = base::SysNSStringToUTF8(channel);
+ } else if (allow_empty_channel) {
+ process_annotations["channel"] = "";
}
-#endif
NSString* version =
base::mac::ObjCCast<NSString>([base::mac::FrameworkBundle()
@@ -81,6 +87,16 @@
process_annotations["plat"] = std::string("OS X");
std::vector<std::string> arguments;
+
+ if (crash_reporter_client->ShouldMonitorCrashHandlerExpensively()) {
+ arguments.push_back("--monitor-self");
+ }
+
+ // Set up --monitor-self-annotation even in the absence of --monitor-self
+ // so that minidumps produced by Crashpad's generate_dump tool will
+ // contain these annotations.
+ arguments.push_back("--monitor-self-annotation=ptype=crashpad-handler");
+
if (!browser_process) {
// If this is an initial client that's not the browser process, it's
// important that the new Crashpad handler also not be connected to any
« no previous file with comments | « components/crash/content/app/crash_reporter_client.cc ('k') | components/crash/content/app/crashpad_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698