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

Unified Diff: content/child/child_thread.cc

Issue 19641008: Implement ChildThread::shutdown and clear members that have refs into blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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_thread.h ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 859d2b2643e4463151504f0e1990e00f4fa880b1..7919a5e81db0651a27acc0a7e3655f40cc8720dc 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -195,6 +195,12 @@ ChildThread::~ChildThread() {
g_lazy_tls.Pointer()->Set(NULL);
}
+void ChildThread::Shutdown() {
+ // Delete objects that hold references to blink so derived classes can
+ // safely shutdown blink in their Shutdown implementation.
+ file_system_dispatcher_.reset();
+}
+
void ChildThread::OnChannelConnected(int32 peer_pid) {
channel_connected_factory_.InvalidateWeakPtrs();
}
@@ -276,7 +282,8 @@ bool ChildThread::OnMessageReceived(const IPC::Message& msg) {
return true;
if (socket_stream_dispatcher_->OnMessageReceived(msg))
return true;
- if (file_system_dispatcher_->OnMessageReceived(msg))
+ if (file_system_dispatcher_ &&
jam 2013/07/23 16:44:23 are you sure this can be called after shutdown?
+ file_system_dispatcher_->OnMessageReceived(msg))
return true;
if (quota_dispatcher_->OnMessageReceived(msg))
return true;
« no previous file with comments | « content/child/child_thread.h ('k') | content/gpu/gpu_child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698