summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webworker_impl.cc
diff options
context:
space:
mode:
authorjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 02:11:58 +0000
committerjianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-06 02:11:58 +0000
commitcfb8c047aae384eb1e6c27c047832ff41a8764b3 (patch)
treee4ecc7853bc3314c83f3855eca620c6b9f478748 /webkit/glue/webworker_impl.cc
parentad615eb3ff51a7d75c065498460e060ad17028ca (diff)
downloadchromium_src-cfb8c047aae384eb1e6c27c047832ff41a8764b3.zip
chromium_src-cfb8c047aae384eb1e6c27c047832ff41a8764b3.tar.gz
chromium_src-cfb8c047aae384eb1e6c27c047832ff41a8764b3.tar.bz2
Fix lifetime control for worker and worker context.
Review URL: http://codereview.chromium.org/40197 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11088 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webworker_impl.cc')
-rw-r--r--webkit/glue/webworker_impl.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/webkit/glue/webworker_impl.cc b/webkit/glue/webworker_impl.cc
index 0d6529c..4b4ae94 100644
--- a/webkit/glue/webworker_impl.cc
+++ b/webkit/glue/webworker_impl.cc
@@ -73,7 +73,6 @@ void WebWorkerImpl::PostMessageToWorkerContext(const string16& message) {
}
void WebWorkerImpl::WorkerObjectDestroyed() {
- TerminateWorkerContext();
}
void WebWorkerImpl::postMessageToWorkerObject(const WebCore::String& message) {
@@ -116,6 +115,9 @@ void WebWorkerImpl::reportPendingActivity(bool hasPendingActivity) {
void WebWorkerImpl::workerContextDestroyed() {
client_->WorkerContextDestroyed();
+
+ // The lifetime of this proxy is controlled by the worker context.
+ delete this;
}
#else