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

Unified Diff: chrome/browser/browser_process_impl.cc

Issue 2719813005: CrOS: Add print statements to help debug BrowserProcessImpl::Unpin crash. (Closed)
Patch Set: Added dumps. Created 3 years, 9 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/browser/browser_process_impl.cc
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 5ec7f984898a06b53aa354c26d737117ecc37c54..c1696a5993c2fa70abdafce402514c197002273a 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -15,7 +15,9 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
#include "base/command_line.h"
+#include "base/debug/alias.h"
#include "base/debug/crash_logging.h"
+#include "base/debug/dump_without_crashing.h"
#include "base/debug/leak_annotations.h"
#include "base/files/file_path.h"
#include "base/location.h"
@@ -1343,6 +1345,17 @@ void BrowserProcessImpl::Unpin() {
__lsan_do_leak_check();
#endif
+ // TODO(sammiequon): This is used to help debug the crash in crbug.com/660962.
+ // Remove this when the crash is fixed or if verified to not be related to
+ // this.
+ if (!base::MessageLoop::current()->is_running()) {
+ std::string debug_info = KeepAliveRegistry::GetInstance()->ToString();
+ char debug_buffer[100];
+ base::strlcpy(debug_buffer, debug_info.c_str(), arraysize(debug_buffer));
+ base::debug::Alias(&debug_buffer);
+ base::debug::DumpWithoutCrashing();
+ }
+
CHECK(base::MessageLoop::current()->is_running());
#if defined(OS_MACOSX)
« no previous file with comments | « no previous file | chrome/browser/lifetime/keep_alive_registry.h » ('j') | chrome/browser/lifetime/keep_alive_registry.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698