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

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

Issue 1934413003: Usecounter added for counting usage of addEventListener for PointerEvents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 55f80e05075c26069a4d01113f5e57cbda2da11d..78e35769e1965fbf4fe478b78d6ecc88d1926961 100644
--- a/third_party/WebKit/Source/core/events/EventTarget.cpp
+++ b/third_party/WebKit/Source/core/events/EventTarget.cpp
@@ -36,6 +36,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/editing/Editor.h"
#include "core/events/Event.h"
+#include "core/events/EventUtil.h"
#include "core/inspector/InspectorInstrumentation.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/UseCounter.h"
@@ -152,6 +153,11 @@ bool EventTarget::addEventListenerInternal(const AtomicString& eventType, EventL
if (!listener)
return false;
+ if (EventUtil::isPointerEventType(eventType)) {
bokan 2016/05/10 22:52:01 Put this in the addedEventListener method below.
sahel 2016/05/11 21:15:02 Done.
+ if (LocalDOMWindow* executingWindow = this->executingWindow()) {
+ UseCounter::count(executingWindow->document(), UseCounter::PointerEventAddListenerCount);
+ }
+ }
V8DOMActivityLogger* activityLogger = V8DOMActivityLogger::currentActivityLoggerIfIsolatedWorld();
if (activityLogger) {
Vector<String> argv;

Powered by Google App Engine
This is Rietveld 408576698