diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 02:11:58 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-06 02:11:58 +0000 |
commit | cfb8c047aae384eb1e6c27c047832ff41a8764b3 (patch) | |
tree | e4ecc7853bc3314c83f3855eca620c6b9f478748 /webkit/glue/webworkerclient_impl.h | |
parent | ad615eb3ff51a7d75c065498460e060ad17028ca (diff) | |
download | chromium_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/webworkerclient_impl.h')
-rw-r--r-- | webkit/glue/webworkerclient_impl.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/glue/webworkerclient_impl.h b/webkit/glue/webworkerclient_impl.h index 4277f4b..4c8277c 100644 --- a/webkit/glue/webworkerclient_impl.h +++ b/webkit/glue/webworkerclient_impl.h @@ -11,9 +11,14 @@ #include "webkit/glue/webworkerclient.h" #include "WorkerContextProxy.h" +#include <wtf/RefPtr.h> class WebWorker; +namespace WebCore { +class ScriptExecutionContext; +}; + // The purpose of this class is to provide a WorkerContextProxy // implementation that we can give to WebKit. Internally, it converts the // data types to Chrome compatible ones so that renderer code can use it over @@ -52,6 +57,9 @@ class WebWorkerClientImpl : public WebCore::WorkerContextProxy, private: virtual ~WebWorkerClientImpl(); + // Guard against context from being destroyed before a worker exits. + WTF::RefPtr<WebCore::ScriptExecutionContext> script_execution_context_; + WebCore::Worker* worker_; scoped_ptr<WebWorker> webworker_; bool asked_to_terminate_; |