diff options
Diffstat (limited to 'chrome/common/webmessageportchannel_impl.cc')
-rw-r--r-- | chrome/common/webmessageportchannel_impl.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/common/webmessageportchannel_impl.cc b/chrome/common/webmessageportchannel_impl.cc index a165db8..6e1b4e1 100644 --- a/chrome/common/webmessageportchannel_impl.cc +++ b/chrome/common/webmessageportchannel_impl.cc @@ -48,7 +48,10 @@ void WebMessagePortChannelImpl::setClient(WebMessagePortChannelClient* client) { void WebMessagePortChannelImpl::destroy() { setClient(NULL); - Release(); + + // Release the object on the main thread, since the destructor might want to + // send an IPC, and that has to happen on the main thread. + ChildThread::current()->message_loop()->ReleaseSoon(FROM_HERE, this); } void WebMessagePortChannelImpl::entangle(WebMessagePortChannel* channel) { |