Closed Bug 500063 Opened 15 years ago Closed 15 years ago

"ASSERTION: Already have an undisplayed context entry for aContent" while running leak tests

Categories

(Core :: Layout, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9.2b1

People

(Reporter: sicking, Assigned: tnikkel)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file)

Log at:

http://tinderbox.mozilla.org/showlog.cgi?log=Firefox/1245784868.1245789314.24977.gz

This is also listing a lot of leaks, but that's due to the assertion being fatal and causing us to shut down.
After several thousand runs of the leaktest I think I know what is going on here; the stackwalker in nsStackWalk.cpp fails in my winxp vm for some reason, so I can't be 100% sure.

The duplicate undisplayed entry is the hidden input inside the fieldset on http://www.mozilla.org/newlayout/samples/test8.html. It's a good bet that the three "recurring into frame construction" warnings are caused by a RecreateFramesForContent on the fieldset when the legend is inserted. Most of the time the insert on the legend is not needed because the legend is already available when the fieldset frame is created. Hence why this assert is so rare. The RecreateFramesForContent call eventually does a ProcessChildren on the fieldset, and that puts the hidden input into the undisplayed map. But we are still in the nsCSSFrameConstructor::ContentAppended loop at around line 6260 where we call ContentInserted for each appended child. This loop skips over content that already has a frame exactly because of a situation like this, but we still call ContentInserted on content that's already in the undisplayed map.

Would adding a check if the content is already in the undisplayed map to this loop be the right thing to do? Or would that cause problems when a "display: none" style is removed from a node and we need to remove the undisplayed entry and create a frame?
Assignee: nobody → tnikkel
> Would adding a check if the content is already in the undisplayed map to this
> loop be the right thing to do?

In the loop in ContentAppended?  Absolutely.
Attached patch patchSplinter Review
Check if there is already an undisplayed entry as well as if there is already a frame.
Attachment #389268 - Flags: review?(bzbarsky)
Attachment #389268 - Flags: review?(bzbarsky) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/92449f4c0f3e
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.2b1
Whiteboard: [orange]
Whiteboard: [orange]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: