Chromium Code Reviews| 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; |