summaryrefslogtreecommitdiffstats
path: root/chrome/common/webmessageportchannel_impl.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 20:20:22 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-06 20:20:22 +0000
commite18e7ad1c60f6472c25bc4af2554f471e55a85a6 (patch)
tree4240f999b4a49da982a2ba91324416db381412f0 /chrome/common/webmessageportchannel_impl.cc
parent63b397506f70501d8089eecf28f50e17417fdd48 (diff)
downloadchromium_src-e18e7ad1c60f6472c25bc4af2554f471e55a85a6.zip
chromium_src-e18e7ad1c60f6472c25bc4af2554f471e55a85a6.tar.gz
chromium_src-e18e7ad1c60f6472c25bc4af2554f471e55a85a6.tar.bz2
Enable message ports for workers.
TEST=included ui test Review URL: http://codereview.chromium.org/160576 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22653 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/webmessageportchannel_impl.cc')
-rw-r--r--chrome/common/webmessageportchannel_impl.cc5
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) {