Index: content/browser/browser_main_loop.cc |
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc |
index 3b4128fccff1188906bae3c2f9a76a7af4fc0815..01dee9bd41cbc46e2d38d10e1955a31693ac743e 100644 |
--- a/content/browser/browser_main_loop.cc |
+++ b/content/browser/browser_main_loop.cc |
@@ -797,14 +797,6 @@ void BrowserMainLoop::PostMainMessageLoopStart() { |
LevelDBWrapperImpl::EnableAggressiveCommitDelay(); |
} |
- // Create the memory instrumentation service. It will initialize the memory |
- // dump manager, too. It makes sense that BrowserMainLoop owns the service; |
- // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown |
- // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. |
- memory_instrumentation_coordinator_ = |
- base::MakeUnique<memory_instrumentation::CoordinatorImpl>( |
- true /* initialize_memory_dump_manager */); |
- |
// Enable memory-infra dump providers. |
InitSkiaEventTracer(); |
tracing::ProcessMetricsMemoryDumpProvider::RegisterForProcess( |
@@ -1399,6 +1391,16 @@ int BrowserMainLoop::BrowserThreadsStarted() { |
// so this cannot happen any earlier than now. |
InitializeMojo(); |
+ // Create the memory instrumentation service. It will initialize the memory |
+ // dump manager, too. It makes sense that BrowserMainLoop owns the service; |
+ // this way, the service is alive for the lifetime of Mojo. Mojo is shutdown |
+ // in BrowserMainLoop::ShutdownThreadsAndCleanupIO. |
+ memory_instrumentation_coordinator_ = |
+ base::MakeUnique<memory_instrumentation::CoordinatorImpl>( |
+ true /* initialize_memory_dump_manager */, |
+ content::ServiceManagerConnection::GetForProcess()->GetConnector(), |
+ true /* initialize_process_map */); |
+ |
#if defined(USE_AURA) |
if (service_manager::ServiceManagerIsRemote()) { |
base::CommandLine::ForCurrentProcess()->AppendSwitch( |