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

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

Issue 23450039: Pass isolate to ScriptValue constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove useless member 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
Index: Source/bindings/v8/ScriptEventListener.cpp
diff --git a/Source/bindings/v8/ScriptEventListener.cpp b/Source/bindings/v8/ScriptEventListener.cpp
index 035802ab42306b9ee6b50c8763b570c39c0830fd..c383d722b2b9df127e42a43b6b2642029889ec34 100644
--- a/Source/bindings/v8/ScriptEventListener.cpp
+++ b/Source/bindings/v8/ScriptEventListener.cpp
@@ -110,14 +110,15 @@ ScriptValue eventListenerHandler(Document* document, EventListener* listener)
if (listener->type() != EventListener::JSEventListenerType)
return ScriptValue();
- v8::HandleScope scope(isolateForScriptExecutionContext(document));
+ v8::Isolate* isolate = isolateForScriptExecutionContext(document);
+ v8::HandleScope scope(isolate);
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
v8::Handle<v8::Context> context = toV8Context(document, v8Listener->world());
v8::Context::Scope contextScope(context);
v8::Handle<v8::Object> function = v8Listener->getListenerObject(document);
if (function.IsEmpty())
return ScriptValue();
- return ScriptValue(function);
+ return ScriptValue(function, isolate);
}
ScriptState* eventListenerHandlerScriptState(Frame* frame, EventListener* listener)

Powered by Google App Engine
This is Rietveld 408576698