Open Bug 1510102 Opened 6 years ago Updated 2 years ago

Ensure nsIPresShell::DirtyRootsList cannot be given the same dirty reflow roots twice

Categories

(Core :: Layout, enhancement, P3)

enhancement

Tracking

()

Tracking Status
firefox65 --- affected

People

(Reporter: mozbugz, Unassigned)

References

Details

nsIPresShell::DirtyRootsList (introduced in bug 1159042) uses an nsTArray to
sort dirty root frames and their depth.

Adding a dirty reflow root checks that it is not already there. This helps with keeping the array small, saving a bit of work if a frame was handled twice, and simplifying Remove().

However duplicated dirty roots should actually be rare, and could be prevented with some work.
dbaron wrote some details in https://phabricator.services.mozilla.com/D9490#300564 :
[...] followup bug to change the uniqueness test to an assertion. (I think that assertion requires one change, which is making PresShell::ResizeReflowIgnoreOverride remove the root frame from the dirty roots list if it is present in the list, so that if the resize reflow is interrupted, we can't end up with the root frame in the list twice.) I can't see any other cases where it's possible to get a root in the list twice, so I really think handling that is an extreme edge case.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.