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

Unified Diff: content/browser/browser_main_runner.cc

Issue 22264015: Make sure unexpected exit paths generate crash dumps for the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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: content/browser/browser_main_runner.cc
diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
index cca1466d9bbe9b191748203a2b4182e43fcb20cf..1a349a2e7cccb56176162951b77ffcc909e0ae06 100644
--- a/content/browser/browser_main_runner.cc
+++ b/content/browser/browser_main_runner.cc
@@ -19,6 +19,7 @@
#if defined(OS_WIN)
#include "base/win/metro.h"
+#include "base/win/win_util.h"
#include "base/win/windows_version.h"
#include "ui/base/win/scoped_ole_initializer.h"
#endif
@@ -103,6 +104,13 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
if (result_code > 0)
return result_code;
+#if defined(OS_WIN)
+ // The process should crash when going through abnormal termination.
+ // Make sure this is done only when Shutdown() will be called.
+ base::win::SetShouldCrashOnProcessDetach(true);
+ base::win::SetAbortBehaviorForCrashReporting();
+#endif
+
// Return -1 to indicate no early termination.
return -1;
}
@@ -130,6 +138,10 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
notification_service_.reset(NULL);
+#if defined(OS_WIN)
+ base::win::SetShouldCrashOnProcessDetach(false);
+#endif
+
is_shutdown_ = true;
}
« 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