| 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;
|
| }
|
|
|
|
|