Index: components/crash/content/app/crashpad.cc |
diff --git a/components/crash/content/app/crashpad.cc b/components/crash/content/app/crashpad.cc |
index 85afe46af675145d2b1251ea5a3b9e5989123eb2..72d68fb89ab1d755238deddc883c80a829ab225e 100644 |
--- a/components/crash/content/app/crashpad.cc |
+++ b/components/crash/content/app/crashpad.cc |
@@ -228,10 +228,15 @@ |
g_simple_string_dictionary = new crashpad::SimpleStringDictionary(); |
crashpad_info->set_simple_annotations(g_simple_string_dictionary); |
- // On Windows chrome_elf registers crash keys. This should work identically |
- // for component and non component builds. |
+#if !defined(OS_WIN) || !defined(COMPONENT_BUILD) |
+ // chrome/common/child_process_logging_win.cc registers crash keys for |
+ // chrome.dll. In a component build, that is sufficient as chrome.dll and |
+ // chrome.exe share a copy of base (in base.dll). In a static build, the EXE |
+ // must separately initialize the crash keys configuration as it has its own |
+ // statically linked copy of base. |
base::debug::SetCrashKeyReportingFunctions(SetCrashKeyValue, ClearCrashKey); |
crash_reporter_client->RegisterCrashKeys(); |
+#endif |
SetCrashKeyValue("ptype", browser_process ? base::StringPiece("browser") |
: base::StringPiece(process_type)); |