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

Unified Diff: components/crash/content/app/fallback_crash_handler_win.cc

Issue 2632123007: Grab more fallback crash detail on canary/dev. (Closed)
Patch Set: Address Scott's comment. Created 3 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/crash/content/app/fallback_crash_handler_win.cc
diff --git a/components/crash/content/app/fallback_crash_handler_win.cc b/components/crash/content/app/fallback_crash_handler_win.cc
index c1784942946ced1d09baf296b85edd90e30444ba..f96d47a3c3a2b672a68cebb6a132eebfb4920bcd 100644
--- a/components/crash/content/app/fallback_crash_handler_win.cc
+++ b/components/crash/content/app/fallback_crash_handler_win.cc
@@ -392,11 +392,6 @@ bool FallbackCrashHandler::GenerateCrashDump(const std::string& product,
crashpad::CrashReportDatabase::CallErrorWritingCrashReport on_error(
database.get(), report);
- // TODO(siggi): Go big on the detail here for Canary/Dev channels.
- const uint32_t kMinidumpType = MiniDumpWithUnloadedModules |
- MiniDumpWithProcessThreadData |
- MiniDumpWithThreadInfo;
-
MINIDUMP_EXCEPTION_INFORMATION exc_info = {};
exc_info.ThreadId = thread_id_;
exc_info.ExceptionPointers =
@@ -438,9 +433,18 @@ bool FallbackCrashHandler::GenerateCrashDump(const std::string& product,
if (!dump_file.IsValid())
return false;
+ uint32_t minidump_type = MiniDumpWithUnloadedModules |
+ MiniDumpWithProcessThreadData |
+ MiniDumpWithThreadInfo;
+
+ // Capture more detail for canary and dev channels. The prefix search caters
+ // for the soon to be outdated "-m" suffixed multi-install channels.
+ if (channel.find("canary") == 0 || channel.find("dev") == 0)
+ minidump_type |= MiniDumpWithIndirectlyReferencedMemory;
+
// Write the minidump to the temp file, and then copy the data to the
// Crashpad-provided handle, as the latter is only open for write.
- if (!MiniDumpWriteDumpWithCrashpadInfo(process_, kMinidumpType, &exc_info,
+ if (!MiniDumpWriteDumpWithCrashpadInfo(process_, minidump_type, &exc_info,
crash_keys, client_id, report->uuid,
&dump_file) ||
!AppendFileContents(&dump_file, report->handle)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698