| Index: content/browser/browser_main_runner.cc
|
| diff --git a/content/browser/browser_main_runner.cc b/content/browser/browser_main_runner.cc
|
| index 2116cc260ed132be2f7929cb9a961d9e5be05e45..d63a0c3559f2b0f0775b11f5a7d6f1b1837c64bd 100644
|
| --- a/content/browser/browser_main_runner.cc
|
| +++ b/content/browser/browser_main_runner.cc
|
| @@ -145,6 +145,7 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| void Shutdown() override {
|
| DCHECK(initialization_started_);
|
| DCHECK(!is_shutdown_);
|
| +
|
| #ifdef LEAK_SANITIZER
|
| // Invoke leak detection now, to avoid dealing with shutdown-only leaks.
|
| // Normally this will have already happened in
|
| @@ -153,6 +154,9 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| // If leaks are found, the process will exit here.
|
| __lsan_do_leak_check();
|
| #endif
|
| +
|
| + main_loop_->PreShutdown();
|
| +
|
| // If startup tracing has not been finished yet, replace it's dumper
|
| // with special version, which would save trace file on exit (i.e.
|
| // startup tracing becomes a version of shutdown tracing).
|
| @@ -207,6 +211,7 @@ class BrowserMainRunnerImpl : public BrowserMainRunner {
|
| if (base::MessageLoop::current()->is_running())
|
| base::MessageLoop::current()->QuitNow();
|
| #endif
|
| + main_loop_->PostShutdown();
|
| main_loop_.reset(NULL);
|
|
|
| notification_service_.reset(NULL);
|
|
|