Index: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp |
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp |
index ad844fa998c4c7a6487405d239eace46c462ff04..3b207e40739c8a899e235344eb256e638836b882 100644 |
--- a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp |
+++ b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp |
@@ -39,6 +39,7 @@ |
#include "core/dom/ExecutionContext.h" |
#include "core/events/BeforeUnloadEvent.h" |
#include "core/events/Event.h" |
+#include "core/probe/CoreProbes.h" |
#include "core/workers/WorkerGlobalScope.h" |
#include "platform/InstanceCounters.h" |
#include "platform/bindings/V8PrivateProperty.h" |
@@ -60,9 +61,12 @@ V8AbstractEventListener::V8AbstractEventListener(bool is_attribute, |
else |
worker_global_scope_ = |
ToWorkerGlobalScope(CurrentExecutionContext(isolate)); |
+ probe::AsyncTaskScheduled(CurrentExecutionContext(isolate), "Event Listener", |
dgozman
2017/05/10 18:36:30
Can we have an event name? I really liked it. E.g.
kozy
2017/05/10 21:24:01
Done.
|
+ this); |
} |
V8AbstractEventListener::~V8AbstractEventListener() { |
+ probe::AsyncTaskCanceled(CurrentExecutionContext(isolate_), this); |
dgozman
2017/05/10 18:36:30
I am worried CurrentExecutionContext() could be wr
kozy
2017/05/10 21:24:00
Done.
|
DCHECK(listener_.IsEmpty()); |
if (IsMainThread()) |
InstanceCounters::DecrementCounter( |
@@ -142,6 +146,8 @@ void V8AbstractEventListener::InvokeEventHandler( |
event_symbol.Set(global, js_event); |
try_catch.Reset(); |
+ probe::AsyncTask async_task(ExecutionContext::From(script_state), this, |
+ "Event Listener called", true, true); |
return_value = CallListenerFunction(script_state, js_event, event); |
if (try_catch.HasCaught()) |
event->target()->UncaughtExceptionInEventHandler(); |