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

Unified Diff: third_party/WebKit/Source/core/events/EventTarget.cpp

Issue 2873713002: [DevTools] added creation stack for event listeners without scheduled stack
Patch Set: better Created 3 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/core/events/EventTarget.cpp
diff --git a/third_party/WebKit/Source/core/events/EventTarget.cpp b/third_party/WebKit/Source/core/events/EventTarget.cpp
index ebf6e7d513d2acd7e3a3a6b2d01caff95ae10caa..1ce6ebfdce9f2a4106ee5147e087f51122c9a151 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -290,6 +290,11 @@ bool EventTarget::AddEventListenerInternal(
if (!listener)
return false;
+ if (listener->GetType() == EventListener::kJSEventListenerType) {
+ String description = event_type + " event";
+ probe::AsyncTaskScheduled(GetExecutionContext(), description, listener);
+ }
+
V8DOMActivityLogger* activity_logger =
V8DOMActivityLogger::CurrentActivityLoggerIfIsolatedWorld();
if (activity_logger) {
@@ -719,6 +724,8 @@ bool EventTarget::FireEventListeners(Event* event,
bool passive_forced = registered_listener.PassiveForcedForDocumentTarget();
probe::UserCallback probe(context, nullptr, event->type(), false, this);
+ probe::AsyncTask async_task(context, listener, "Event Listener called",
+ true, true);
// To match Mozilla, the AT_TARGET phase fires both capturing and bubbling
// event listeners, even though that violates some versions of the DOM spec.

Powered by Google App Engine
This is Rietveld 408576698