Closed Bug 1056841 Opened 10 years ago Closed 10 years ago

###!!! ASSERTION: These should always be in sync!: 'slowNode == node'

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: gkrizsanits, Assigned: gkrizsanits)

References

Details

Attachments

(2 files)

In Bug 777674 we hit this assertion. More info: https://bugzilla.mozilla.org/show_bug.cgi?id=777674#c91

We got an nsXULElement with nulled parent but the mContainingShadow were not nulled out, I think the problem is that we null that out in the #ifdef MOZ_XUL case if the xulElem is not null. I think that's a bug, and we always should...
Comment on attachment 8476691 [details] [diff] [review]
Always nulling mContainingShadow in Element::UnbindFromTree

I didn't put much effort to figure out a nicer version, wanted to know first if you think this is a right fix or I'm doing something stupid...
Attachment #8476691 - Attachment is patch: true
Attachment #8476691 - Flags: feedback?(wchen)
Blocks: 777674
Comment on attachment 8476691 [details] [diff] [review]
Always nulling mContainingShadow in Element::UnbindFromTree

You're right, we should be nulling mContainingShadow regardless of whether the element is XUL.
Attachment #8476691 - Flags: feedback?(wchen) → feedback+
Comment on attachment 8479692 [details] [diff] [review]
Always nulling mContainingShadow in Element::UnbindFromTree. v1

Review of attachment 8479692 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/src/Element.cpp
@@ +1488,5 @@
>    }
>  
>    // Unset this since that's what the old code effectively did.
>    UnsetFlags(NODE_FORCE_XBL_BINDINGS);
> +  bool resetBindingParent = true;

Let's call this clearBindingParent

@@ +1500,3 @@
>  #endif
> +
> +  if (nsDOMSlots* slots = GetExistingDOMSlots()) {

Assignment should go on its own line.
Attachment #8479692 - Flags: review?(wchen) → review+
https://hg.mozilla.org/mozilla-central/rev/3b215da11652
Assignee: nobody → gkrizsanits
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: