UIEvent::DuplicatePrivateData is called in simple button.click() / checkbox.click() testcase
Categories
(Core :: DOM: Events, defect)
Tracking
()
People
(Reporter: mstange, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [sp3])
Here's a profile from the checkbox.click()
testcase from bug 1834003: https://share.firefox.dev/3NLKYvI
A fair share of the time (3.5%) is taken up by UIEvent::DuplicatePrivateData
. From reading the code, it seems that it should only be called if a listener stores the DOM event. But the listener in the testcase doesn't do that.
What causes us to take this slow path?
Updated•1 year ago
|
Comment 1•1 year ago
|
||
It should be called there, if the event object is alive. My guess is that there has been some js implemented listener for the event, so that the js wrapper is alive (wrapper has always a strong reference to the event) and we need to keep the data the event has - and thus call DuplicatePrivateData.
Updated•1 year ago
|
Reporter | ||
Comment 2•1 year ago
|
||
Oh, yes, in this testcase there is indeed a JS listener for the event. Thanks, that explains it.
Description
•