Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(263)

Unified Diff: Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: code review (pfeldman) Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/V8PerContextData.cpp ('k') | Source/bindings/v8/WorkerScriptController.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
diff --git a/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp b/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
index 5ac095d5215d6d75616abac4e4f58bad6a615523..51db2a8fa0745477bd5bb7ccbcd720a8e1b22a38 100644
--- a/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
+++ b/Source/bindings/v8/V8WorkerGlobalScopeEventListener.cpp
@@ -58,7 +58,8 @@ void V8WorkerGlobalScopeEventListener::handleEvent(ScriptExecutionContext* conte
// See issue 889829.
RefPtr<V8AbstractEventListener> protect(this);
- v8::HandleScope handleScope;
+ v8::Isolate* isolate = getIsolateFromScriptExecutionContext(context);
+ v8::HandleScope handleScope(isolate);
WorkerScriptController* script = toWorkerGlobalScope(context)->script();
if (!script)
@@ -72,7 +73,6 @@ void V8WorkerGlobalScopeEventListener::handleEvent(ScriptExecutionContext* conte
v8::Context::Scope scope(v8Context);
// Get the V8 wrapper for the event object.
- v8::Isolate* isolate = v8Context->GetIsolate();
v8::Handle<v8::Value> jsEvent = toV8(event, v8::Handle<v8::Object>(), isolate);
invokeEventHandler(context, event, v8::Local<v8::Value>::New(isolate, jsEvent));
« no previous file with comments | « Source/bindings/v8/V8PerContextData.cpp ('k') | Source/bindings/v8/WorkerScriptController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698