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

Unified Diff: content/child/child_thread_impl.cc

Issue 1035313002: content: Remove non-thread-safe use of WeakPtrs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cl format Created 5 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 | « content/child/child_discardable_shared_memory_manager.cc ('k') | 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 41c5543cb695f52c268f9d49724e2813515282ed..c82f7919984240515025f8a1ea767af23b2860a6 100644
--- a/content/child/child_thread_impl.cc
+++ b/content/child/child_thread_impl.cc
@@ -477,6 +477,10 @@ void ChildThreadImpl::Init(const Options& options) {
}
ChildThreadImpl::~ChildThreadImpl() {
+ // ChildDiscardableSharedMemoryManager has to be destroyed while
+ // |thread_safe_sender_| is still valid.
+ discardable_shared_memory_manager_.reset();
+
#if defined(OS_ANDROID)
{
base::AutoLock lock(g_lazy_child_thread_lock.Get());
« no previous file with comments | « content/child/child_discardable_shared_memory_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698