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

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..c72163ee6043d77046d8502187e3bf5186ca4f6d 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 (GetConnector()) {
Lei Zhang 2017/03/25 01:56:34 GetConnector() is service_manager_connection_->Get
Ken Rockot(use gerrit already) 2017/03/25 02:02:48 Thanks. Fixed. /shamecube
+ 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