Closed Bug 1843479 Opened 1 year ago Closed 1 year ago

UIEvent::DuplicatePrivateData is called in simple button.click() / checkbox.click() testcase

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

RESOLVED INVALID

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?

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.

Severity: -- → S3

Oh, yes, in this testcase there is indeed a JS listener for the event. Thanks, that explains it.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.