Index: content/browser/browser_main_runner.cc |
=================================================================== |
--- content/browser/browser_main_runner.cc (revision 124300) |
+++ content/browser/browser_main_runner.cc (working copy) |
@@ -47,6 +47,8 @@ |
if (parameters.command_line.HasSwitch(switches::kWaitForDebugger)) |
ChildProcess::WaitForDebugger("Browser"); |
+ statistics_.reset(new base::StatisticsRecorder); |
+ |
notification_service_.reset(new NotificationServiceImpl); |
main_loop_.reset(new content::BrowserMainLoop(parameters)); |
@@ -76,8 +78,6 @@ |
com_initializer_.reset(new base::win::ScopedCOMInitializer); |
#endif // OS_WIN |
- statistics_.reset(new base::StatisticsRecorder); |
- |
main_loop_->CreateThreads(); |
int result_code = main_loop_->GetResultCode(); |
if (result_code > 0) |
@@ -103,8 +103,6 @@ |
if (created_threads_) |
main_loop_->ShutdownThreadsAndCleanUp(); |
- statistics_.reset(NULL); |
- |
#if defined(OS_WIN) |
com_initializer_.reset(NULL); |
#endif |
@@ -113,6 +111,8 @@ |
notification_service_.reset(NULL); |
+ statistics_.reset(NULL); |
+ |
is_shutdown_ = true; |
} |