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

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

Issue 23885006: Pass isolate to V8LazyEventListener constructor (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « no previous file | Source/bindings/v8/V8LazyEventListener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptEventListener.cpp
diff --git a/Source/bindings/v8/ScriptEventListener.cpp b/Source/bindings/v8/ScriptEventListener.cpp
index c10cea9bf6d8dc71c14001ca46b74e625dc6d90b..b7ce8a7faa457f81d62583a2014fceb07e2a9a89 100644
--- a/Source/bindings/v8/ScriptEventListener.cpp
+++ b/Source/bindings/v8/ScriptEventListener.cpp
@@ -60,15 +60,19 @@ PassRefPtr<V8LazyEventListener> createAttributeEventListener(Node* node, const Q
TextPosition position(OrdinalNumber::fromZeroBasedInt(1), OrdinalNumber::first());
String sourceURL;
+ v8::Isolate* isolate;
if (Frame* frame = node->document().frame()) {
+ isolate = toIsolate(frame);
ScriptController* scriptController = frame->script();
if (!scriptController->canExecuteScripts(AboutToExecuteScript))
return 0;
position = scriptController->eventHandlerPosition();
sourceURL = node->document().url().string();
+ } else {
+ isolate = v8::Isolate::GetCurrent();
}
- return V8LazyEventListener::create(name.localName().string(), eventParameterName(node->isSVGElement()), value, sourceURL, position, node);
+ return V8LazyEventListener::create(name.localName().string(), eventParameterName(node->isSVGElement()), value, sourceURL, position, node, isolate);
}
PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame* frame, const QualifiedName& name, const AtomicString& value)
@@ -86,7 +90,7 @@ PassRefPtr<V8LazyEventListener> createAttributeEventListener(Frame* frame, const
TextPosition position = scriptController->eventHandlerPosition();
String sourceURL = frame->document()->url().string();
- return V8LazyEventListener::create(name.localName().string(), eventParameterName(frame->document()->isSVGDocument()), value, sourceURL, position, 0);
+ return V8LazyEventListener::create(name.localName().string(), eventParameterName(frame->document()->isSVGDocument()), value, sourceURL, position, 0, toIsolate(frame));
}
String eventListenerHandlerBody(Document* document, EventListener* listener)
« no previous file with comments | « no previous file | Source/bindings/v8/V8LazyEventListener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698