Disable Mutation Events in chrome/XUL
Categories
(Core :: DOM: Events, defect, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox116 | --- | fixed |
People
(Reporter: smaug, Assigned: masayuki)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
Comment 1•6 years ago
|
||
Updated•2 years ago
|
Comment 2•1 year ago
|
||
Hi Masayuki, can you please investigate if we still have something to do? Thank you.
Assignee | ||
Comment 3•1 year ago
|
||
Yeah, I checked that. Neither in m-c nor comm-central uses the legacy mutation events (except the debugger of the devtools). So, we can disable them now.
- https://searchfox.org/comm-central/search?q=DOMAttrModified&path=&case=false®exp=false
- https://searchfox.org/comm-central/search?q=DOMCharacterDataModified&path=&case=false®exp=false
- https://searchfox.org/comm-central/search?q=DOMNodeInserted&path=&case=false®exp=false
- https://searchfox.org/comm-central/search?q=DOMNodeRemoved&path=&case=false®exp=false
- https://searchfox.org/comm-central/search?q=DOMNodeInsertedIntoDocument&path=&case=false®exp=false
- https://searchfox.org/comm-central/search?q=DOMNodeRemovedFromDocument&path=&case=false®exp=false
- https://searchfox.org/comm-central/search?q=DOMSubtreeModified&path=&case=false®exp=false
Assignee | ||
Comment 4•1 year ago
|
||
Assignee | ||
Comment 5•1 year ago
|
||
Adding code to make EventDispatcher
stop dispatching legacy mutation events causes performance regressions.
https://treeherder.mozilla.org/perfherder/comparesubtest?originalProject=try&newProject=try&newRevision=be77639da8710275f150c5b23a4658baa2bf0784&originalSignature=4586009&newSignature=4586009&framework=13&application=firefox&originalRevision=5d0f7fef10604ef28ec50abf311b24354152ce26&page=1&showOnlyImportant=1
Therefore, I think that what we can do here is that we can just make it check either a chrome document or a default handler is adding an event listener in EventListenerManager
.
Assignee | ||
Comment 6•1 year ago
|
||
The legacy DOM mutation events shouldn't be used even in content and must not be
used in chrome.
This patch makes it crash if legacy mutation event listener is:
- added to a node in a chrome document
- added to a node in a native anonymous subtree
- added to the system event group
- implemented by C++
This causes some crash tests and chrome tests. Therefore, this patch modifies
them to use MutationObserver
instead or removes them if it's impossible to
rewrite with MutationObserver
.
Note that if I prevent to dispatch mutation events in some/all of the cases,
that causes performance regression in Speedometer3. Therefore, this patch
does not touch EventDispatcher
.
Updated•1 year ago
|
Comment 8•1 year ago
|
||
bugherder |
Description
•