diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 20:04:41 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-12 20:04:41 +0000 |
commit | 289bf6b65d6fe6c45452d8c364e5730aa8bacb03 (patch) | |
tree | 00da6240d6ec608e029f4325921d8ad034a23bb0 /webkit/port | |
parent | 1e717ce18e67ffb92b6830237260453c4067794c (diff) | |
download | chromium_src-289bf6b65d6fe6c45452d8c364e5730aa8bacb03.zip chromium_src-289bf6b65d6fe6c45452d8c364e5730aa8bacb03.tar.gz chromium_src-289bf6b65d6fe6c45452d8c364e5730aa8bacb03.tar.bz2 |
Add v8::Locker in worker related code in order to run multiple workers in a worker process.
Review URL: http://codereview.chromium.org/44003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/port')
-rw-r--r-- | webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp | 2 | ||||
-rw-r--r-- | webkit/port/bindings/v8/v8_events.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp b/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp index fd0c160..06ff389 100644 --- a/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp +++ b/webkit/port/bindings/v8/WorkerContextExecutionProxy.cpp @@ -84,6 +84,7 @@ void WorkerContextExecutionProxy::Dispose() { // the worker context object is going to be disposed immediately when a // worker thread is tearing down. We do not want to re-delete the real object // when JS object is garbage collected. + v8::Locker locker; v8::HandleScope scope; v8::Persistent<v8::Object> wrapper = GetDOMObjectMap().get(m_workerContext); if (!wrapper.IsEmpty()) @@ -279,6 +280,7 @@ bool WorkerContextExecutionProxy::ForgetV8EventObject(Event* event) { v8::Local<v8::Value> WorkerContextExecutionProxy::Evaluate( const String& str, const String& file_name, int base_line) { + v8::Locker locker; v8::HandleScope hs; InitContextIfNeeded(); diff --git a/webkit/port/bindings/v8/v8_events.cpp b/webkit/port/bindings/v8/v8_events.cpp index 9f84d9b..0cebb57 100644 --- a/webkit/port/bindings/v8/v8_events.cpp +++ b/webkit/port/bindings/v8/v8_events.cpp @@ -504,6 +504,7 @@ void V8WorkerContextEventListener::handleEvent(Event* event, // See issue 889829 RefPtr<V8AbstractEventListener> self(this); + v8::Locker locker; v8::HandleScope handle_scope; v8::Handle<v8::Context> context = m_proxy->GetContext(); |