"Break on node removal" doesn't break when setting the parent node's innerHTML
Categories
(DevTools :: Debugger, defect)
Tracking
(firefox-esr115 wontfix, firefox-esr128 wontfix, firefox-esr140 wontfix, firefox142 wontfix, firefox143 wontfix, firefox144 fixed)
People
(Reporter: hbenl, Assigned: masayuki)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
STR:
- open https://hbenl.github.io/test/innerhtml/
- open the inspector and set "Break on node removal" on the inner <div> surrounding the text "To replace"
- click the "Replace" button
Expected:
- the debugger breaks in the onclick handler of the button
Actual:
- the debugger doesn't break
I noticed this while investigating Bug 1982549 (and was able to work around it by selecting "Break on subtree modification" on the parent node).
| Reporter | ||
Updated•10 months ago
|
| Assignee | ||
Comment 1•10 months ago
|
||
While I'm removing the legacy DOM mutation events, I found this bug.
| Assignee | ||
Updated•10 months ago
|
| Assignee | ||
Comment 2•10 months ago
|
||
Probably, regression of bug 1694548.
Comment 3•10 months ago
|
||
Set release status flags based on info from the regressing bug 1694548
| Assignee | ||
Comment 4•10 months ago
|
||
It's caused by bugs in hot paths. So, it's not safe to uplift.
| Assignee | ||
Comment 5•10 months ago
|
||
| Assignee | ||
Comment 6•10 months ago
|
||
"Node Removal" of "Break on..." of DevTools listens to
"devtoolschildremoved" event which is dispatched immediately before
"DOMNodeRemoved" event by nsContentUtils::MaybeFireNodeRemoved().
However, some callers stops calling that if
nsContentUtils::HasMutationListeners() or
nsContentUtils::WantMutationEvents() return false, for example,
nsINode::ReplaceChildren() [1].
Therefore, they should return true if the type is
NS_EVENT_BITS_MUTATION_NODEREMOVED and DevTools is observing the
mutations.
As far as I've checked, there is no test of this feature. I guess it's
impossible due to breaking the running JS. Therefore, this patch does
not contain a new test.
Comment 8•10 months ago
|
||
| bugherder | ||
Updated•10 months ago
|
Updated•9 months ago
|
Description
•