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

Unified Diff: third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp

Issue 1950403002: Add the ability to return descedant event listeners. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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: third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
diff --git a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
index e40898d35bbe65cc61e3951e85c8b4925071bfab..8d80b0cfc6bfda670f9d92ac65156d37a9ff3e5e 100644
--- a/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
+++ b/third_party/WebKit/Source/platform/v8_inspector/V8InjectedScriptHost.cpp
@@ -175,11 +175,21 @@ void V8InjectedScriptHost::getEventListenersCallback(const v8::FunctionCallbackI
if (info.Length() < 1)
return;
+ unsigned filterMask = V8EventListenerInfo::EventListenerFilterShowPassive | V8EventListenerInfo::EventListenerFilterShowBlocking;
+ if (info.Length() > 1 && info[1]->IsTrue())
+ filterMask |= V8EventListenerInfo::EventListenerFilterShowDescendants;
+
+ if (info.Length() > 2 && info[2]->IsFalse())
+ filterMask &= ~V8EventListenerInfo::EventListenerFilterShowPassive;
+
+ if (info.Length() > 3 && info[3]->IsFalse())
+ filterMask &= ~V8EventListenerInfo::EventListenerFilterShowBlocking;
+
V8DebuggerClient* client = unwrapDebugger(info)->client();
V8EventListenerInfoList listenerInfo;
// eventListeners call can produce message on ErrorEvent during lazy event listener compilation.
client->muteWarningsAndDeprecations();
- client->eventListeners(info[0], listenerInfo);
+ client->eventListeners(info[0], filterMask, listenerInfo);
client->unmuteWarningsAndDeprecations();
v8::Local<v8::Object> result = v8::Object::New(info.GetIsolate());

Powered by Google App Engine
This is Rietveld 408576698