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

Unified Diff: content/child/child_thread_impl.cc

Issue 2779443002: Fix nullptr deref in ChildThreadImpl (Closed)
Patch Set: . Created 3 years, 9 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/child/child_thread_impl.cc
diff --git a/content/child/child_thread_impl.cc b/content/child/child_thread_impl.cc
index 1369ba4faf3cfaf89b07dee0f7800ce4a86b1837..f91f11f74e38def29aed7e45a9dae7bb2297e870 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -503,13 +503,14 @@ void ChildThreadImpl::Init(const Options& options) {
ChildProcess::current()->io_task_runner()));
channel_->AddFilter(new ChildMemoryMessageFilter());
- memory_instrumentation::MemoryDumpManagerDelegateImpl::Config config(
- GetConnector(), mojom::kBrowserServiceName);
- auto delegate =
- base::MakeUnique<memory_instrumentation::MemoryDumpManagerDelegateImpl>(
- config);
- base::trace_event::MemoryDumpManager::GetInstance()->Initialize(
- std::move(delegate));
+ if (service_manager_connection_) {
+ memory_instrumentation::MemoryDumpManagerDelegateImpl::Config config(
+ GetConnector(), mojom::kBrowserServiceName);
+ auto delegate = base::MakeUnique<
+ memory_instrumentation::MemoryDumpManagerDelegateImpl>(config);
+ base::trace_event::MemoryDumpManager::GetInstance()->Initialize(
+ std::move(delegate));
+ }
}
// In single process mode we may already have a power monitor,
« 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