Use counters are incremented even if an event listener didn't actually fire |
||
Issue description
There are some Use counters in Event::fireEventListeners.
If an event listener was added for an event that doesn't bubble the Use counter might increase even though the event wasn't fired at the target.
For example:
addEventListener("mousewheel", function(e) { }, false);
dispatchEvent( new WheelEvent("wheel", {bubbles: false}) );
Will likely report a UMA metric.
There are a few other scenarios as well.
We should just likely use the result of whether we dispatched at least one listener or not.
,
Sep 29 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4908e484c88c0de62483404d6d6a63515acf67af commit 4908e484c88c0de62483404d6d6a63515acf67af Author: dtapuska <dtapuska@chromium.org> Date: Thu Sep 29 15:27:08 2016 Adjust use counters for editing and legacy events. Editing events incorrectly counted all the time even if there wasn't a listener. Only that the target had rareData on the element. I've re-enumerated the use counter values because they were completely wrong. For legacy events, fix the semantics but it is really a minor issue that I don't think deserves new enumeration values. BUG= 612829 Review-Url: https://codereview.chromium.org/2380703002 Cr-Commit-Position: refs/heads/master@{#421825} [modify] https://crrev.com/4908e484c88c0de62483404d6d6a63515acf67af/third_party/WebKit/Source/core/events/EventTarget.cpp [modify] https://crrev.com/4908e484c88c0de62483404d6d6a63515acf67af/third_party/WebKit/Source/core/frame/UseCounter.h [modify] https://crrev.com/4908e484c88c0de62483404d6d6a63515acf67af/tools/metrics/histograms/histograms.xml
,
Sep 29 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by dtapu...@chromium.org
, May 18 2016Labels: Hotlist-Input-Dev