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

Unified Diff: chrome/app/chrome_crash_reporter_client_win.cc

Issue 2088133002: Switch chrome_elf exception handling from breakpad to crashpad. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Register crash keys only once in the process. Created 4 years, 6 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
Index: chrome/app/chrome_crash_reporter_client_win.cc
diff --git a/chrome/app/chrome_crash_reporter_client_win.cc b/chrome/app/chrome_crash_reporter_client_win.cc
index 42e2093efa73d2506a45a87d0b89b2b4cc974dc0..61197252af72d76c843705eaec3e8a54595f3dc9 100644
--- a/chrome/app/chrome_crash_reporter_client_win.cc
+++ b/chrome/app/chrome_crash_reporter_client_win.cc
@@ -69,6 +69,12 @@ int snprintf(char* buffer,
}
size_t RegisterCrashKeysHelper() {
+ // Crash keys should be registered only once for the duration of the
scottmg 2016/06/27 19:37:46 Why is this getting called multiple times now?
ananta 2016/06/27 20:00:26 Can get called from child_process_logging_win.cc w
+ // process.
+ static size_t registered_keys_size = 0;
+ if (registered_keys_size)
+ return registered_keys_size;
+
// The following keys may be chunked by the underlying crash logging system,
// but ultimately constitute a single key-value pair.
//
@@ -172,7 +178,9 @@ size_t RegisterCrashKeysHelper() {
}
}
- return base::debug::InitCrashKeys(&keys[0], keys.size(), kChunkMaxLength);
+ registered_keys_size =
+ base::debug::InitCrashKeys(&keys[0], keys.size(), kChunkMaxLength);
+ return registered_keys_size;
}
} // namespace
@@ -201,6 +209,11 @@ void ChromeCrashReporterClient::InitializeCrashReportingForProcess() {
}
#endif // NACL_WIN64
+// static
+void ChromeCrashReporterClient::RegisterCrashKeysForDebugging() {
+ RegisterCrashKeysHelper();
+}
+
bool ChromeCrashReporterClient::GetAlternativeCrashDumpLocation(
base::string16* crash_dir) {
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate

Powered by Google App Engine
This is Rietveld 408576698