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

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

Issue 1042853004: [DevTools] Event Listeners Sidebar shows window listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Extracted eventListenersTreeOutline.css Created 5 years, 8 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/core/v8/ScriptEventListener.cpp
diff --git a/Source/bindings/core/v8/ScriptEventListener.cpp b/Source/bindings/core/v8/ScriptEventListener.cpp
index ce53c4b858bd9cf18f0e34ed87023c4cae230151..197730c6ef171754c2f7b5107963bb8cfebef938 100644
--- a/Source/bindings/core/v8/ScriptEventListener.cpp
+++ b/Source/bindings/core/v8/ScriptEventListener.cpp
@@ -104,17 +104,17 @@ static v8::MaybeLocal<v8::Function> eventListenerEffectiveFunction(v8::Isolate*
return v8::MaybeLocal<v8::Function>();
}
-ScriptValue eventListenerHandler(Document* document, EventListener* listener)
+ScriptValue eventListenerHandler(ExecutionContext* executionContext, EventListener* listener)
{
if (listener->type() != EventListener::JSEventListenerType)
return ScriptValue();
- v8::Isolate* isolate = toIsolate(document);
+ v8::Isolate* isolate = toIsolate(executionContext);
v8::HandleScope scope(isolate);
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
- v8::Local<v8::Context> context = toV8Context(document, v8Listener->world());
+ v8::Local<v8::Context> context = toV8Context(executionContext, v8Listener->world());
v8::Context::Scope contextScope(context);
- v8::Local<v8::Object> function = v8Listener->getListenerObject(document);
+ v8::Local<v8::Object> function = v8Listener->getListenerObject(executionContext);
if (function.IsEmpty())
return ScriptValue();
return ScriptValue(ScriptState::from(context), function);
@@ -130,16 +130,16 @@ ScriptState* eventListenerHandlerScriptState(LocalFrame* frame, EventListener* l
return ScriptState::from(v8Context);
}
-bool eventListenerHandlerLocation(Document* document, EventListener* listener, String& scriptId, int& lineNumber, int& columnNumber)
+bool eventListenerHandlerLocation(ExecutionContext* executionContext, EventListener* listener, String& scriptId, int& lineNumber, int& columnNumber)
{
if (listener->type() != EventListener::JSEventListenerType)
return false;
- v8::HandleScope scope(toIsolate(document));
+ v8::HandleScope scope(toIsolate(executionContext));
V8AbstractEventListener* v8Listener = static_cast<V8AbstractEventListener*>(listener);
- v8::Local<v8::Context> context = toV8Context(document, v8Listener->world());
+ v8::Local<v8::Context> context = toV8Context(executionContext, v8Listener->world());
v8::Context::Scope contextScope(context);
- v8::Local<v8::Object> object = v8Listener->getListenerObject(document);
+ v8::Local<v8::Object> object = v8Listener->getListenerObject(executionContext);
if (object.IsEmpty())
return false;
v8::Local<v8::Function> function;
« no previous file with comments | « Source/bindings/core/v8/ScriptEventListener.h ('k') | Source/bindings/core/v8/custom/V8InjectedScriptHostCustom.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698