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

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

Issue 23788005: Remove calls to HandleScope default ctor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 4 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
Index: Source/bindings/v8/ScriptEventListener.cpp
diff --git a/Source/bindings/v8/ScriptEventListener.cpp b/Source/bindings/v8/ScriptEventListener.cpp
index 1d4a7f3a5ff1d3027f7cfd7a217634d7c6fc87c2..ca973a39728335f08207d86080bd12aee8f5ab6c 100644
--- a/Source/bindings/v8/ScriptEventListener.cpp
+++ b/Source/bindings/v8/ScriptEventListener.cpp
@@ -94,7 +94,7 @@ String eventListenerHandlerBody(Document* document, EventListener* listener)
if (listener->type() != EventListener::JSEventListenerType)
return "";
- v8::HandleScope scope;
+ v8::HandleScope scope(getIsolateFromScriptExecutionContext(document));
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world());
v8::Context::Scope contextScope(context);
@@ -110,7 +110,7 @@ ScriptValue eventListenerHandler(Document* document, EventListener* listener)
if (listener->type() != EventListener::JSEventListenerType)
return ScriptValue();
- v8::HandleScope scope;
+ v8::HandleScope scope(getIsolateFromScriptExecutionContext(document));
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world());
v8::Context::Scope contextScope(context);
@@ -125,7 +125,7 @@ ScriptState* eventListenerHandlerScriptState(Frame* frame, EventListener* listen
if (listener->type() != EventListener::JSEventListenerType)
return 0;
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
- v8::HandleScope scope;
+ v8::HandleScope scope(frame->script()->isolate());
v8::Handle<v8::Context> v8Context = frame->script()->windowShell(v8Listener->world())->context();
return ScriptState::forContext(v8Context);
}
@@ -135,7 +135,7 @@ bool eventListenerHandlerLocation(Document* document, EventListener* listener, S
if (listener->type() != EventListener::JSEventListenerType)
return false;
- v8::HandleScope scope;
+ v8::HandleScope scope(getIsolateFromScriptExecutionContext(document));
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world());
v8::Context::Scope contextScope(context);

Powered by Google App Engine
This is Rietveld 408576698