Open Bug 1551621 Opened 5 years ago Updated 2 years ago

Assertion error in debug builds possibly related to shadow DOM

Categories

(Core :: DOM: Events, defect, P2)

defect

Tracking

()

People

(Reporter: mstriemer, Assigned: emilio)

References

Details

(Keywords: leave-open)

Attachments

(3 files)

In bug 1547835 there's a patch that has a debug test failure.

0:23.98 GECKO(43230) Assertion failure: nsContentUtils::ContentIsFlattenedTreeDescendantOf( leaf, aContentRemoved) || leaf->SubtreeRoot()->HasFlag(NODE_IS_ANONYMOUS_ROOT), at /builds/worker/workspace/build/src/dom/events/EventStateManager.cpp:5413

I haven't been able to isolate a smaller test case but the error happens when running toolkit/mozapps/extensions/test/browser/browser_html_updates.js. There are other patches that follow similar steps but do not cause the bug.

One thing I did notice is that the error happened when calling notesBtn.click(), but switching that line to EventUtils.synthesizeMouseAtCenter(notesBtn, {}, win) avoids the bug. I'm going to update my patch to use that to unblock it.

I will try and find a smaller test case in the future, but don't have much more time to spend right now.

Attached file Reduced test-case.

Hover over the red box, and wait a bit.

Assignee: nobody → emilio

I think this makes sense. The ESM keeps a bunch of state in terms of the flat
tree after all, and when an element moves around on the flat tree we shouldn't
leave stale state around, which is what happens now.

May need a bit more care regarding the IME call from ESM, but I think this
should otherwise do. Let me know if you agree and I'll write a test for this :-)

Could you do a try push with my patch on top of the patch that triggered the assertion on automation, and confirm that this fixes it?

Thanks!

Flags: needinfo?(mstriemer)
Priority: -- → P2

Sorry for the delay, I confirmed I can still generate the failure on central (after reverting the test change that avoids it), and this patch fixes the assertion error.

Without patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=6f12189f681d0db2f34691c3962386a030374625&selectedJob=253161719
With patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=75e2c0bad0a2f55ce4db9350e72d7d85162d3589

Flags: needinfo?(mstriemer)

Any updates here? We're hitting this again in another test.

Flags: needinfo?(emilio)

I will make the assertion non-fatal for now, since there's disagreement on what the right behavior is. I filed https://github.com/whatwg/html/issues/4795.

Flags: needinfo?(emilio)
Keywords: leave-open
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1604c99e3ad1
Downgrade an assertion for now so as to not block people. r=bzbarsky

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?

Flags: needinfo?(emilio)

No

Flags: needinfo?(emilio)

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

The leave-open keyword is there and there is no activity for 6 months.
:emilio, maybe it's time to close this bug?
For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: