Closed Bug 292247 Opened 20 years ago Closed 20 years ago

[FIX]XUL overlays violate BindToTree/UnbindFromTree invariants

Categories

(Core :: XUL, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta2

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

XUL overlays violate the fundamental invariant that a node needs to be unbound
before being bound to a different tree.  This means that we assert on any
non-XUL content in an overlay.  Once the mDocument mess with XUL is fixed and
the same asserts are enabled for XUL we will assert once for every node in the
overlay during an overlay merge.  That would make startup quite fun.

I'm not really sure who, if anyone, even owns the overlay code... does anyone?
Attached file Overlay
Attached file Testcase
Attached patch Proposed patchSplinter Review
So the problem was that the mOverlay node of the overlay forward reference
thought it was in a document.  The simple fix is to remove the silly hack in
nsXULElement::Create that sets the IN_DOCUMENT flag on newly-created nodes.  I
checked all callers of Create and that should be just fine.

The nsXULDocument change is just removing unused code -- no one uses tempID.
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #182088 - Flags: superreview?(jst)
Attachment #182088 - Flags: review?(peterv)
Priority: -- → P1
Summary: XUL overlays violate BindToTree/UnbindFromTree invariants → [FIX]XUL overlays violate BindToTree/UnbindFromTree invariants
Target Milestone: --- → mozilla1.8beta2
Comment on attachment 182088 [details] [diff] [review]
Proposed patch

sr=jst
Attachment #182088 - Flags: superreview?(jst) → superreview+
Comment on attachment 182088 [details] [diff] [review]
Proposed patch

Requesting approval.  This should be pretty safe and get us another step closer
to assert-freedom...
Attachment #182088 - Flags: approval1.8b2?
Comment on attachment 182088 [details] [diff] [review]
Proposed patch

a=chofmann
Attachment #182088 - Flags: approval1.8b2? → approval1.8b2+
Fixed.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
*** Bug 293844 has been marked as a duplicate of this bug. ***
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: