Bug 1405547: Account for mid-unbind conditions in the BitsArePropagated assertion too. r?heycam draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 21 Oct 2017 12:37:52 +0200
changeset 684432 192e481cee60ce28b1a67211c8a6d89a268546b9
parent 684335 bb484cbed6dc5c7fbd2674aeca3c96535224c1fc
child 736865 23b44ed1d62b9dd4fb8164b1dd5335bbb512fb2b
push id85618
push userbmo:emilio@crisal.io
push dateSun, 22 Oct 2017 11:37:25 +0000
reviewersheycam
bugs1405547
milestone58.0a1
Bug 1405547: Account for mid-unbind conditions in the BitsArePropagated assertion too. r?heycam I'm not adding a crashtest because the one provided is kinda unreliable, and I suck and I wasn't able to find a better one. MozReview-Commit-ID: CmaF0NO4Dff
dom/base/Element.cpp
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -4570,16 +4570,17 @@ NoteDirtyElement(Element* aElement, uint
 
   // See the comment in nsIDocument::SetServoRestyleRoot about the !IsElement()
   // check there. Same justification here.
   MOZ_ASSERT(aElement == doc->GetServoRestyleRoot() ||
              !doc->GetServoRestyleRoot()->IsElement() ||
              nsContentUtils::ContentIsFlattenedTreeDescendantOfForStyle(
                aElement, doc->GetServoRestyleRoot()));
   MOZ_ASSERT(aElement == doc->GetServoRestyleRoot() ||
+             !doc->GetServoRestyleRoot()->IsElement() ||
              BitsArePropagated(parent, aBits, doc->GetServoRestyleRoot()));
   MOZ_ASSERT(doc->GetServoRestyleRootDirtyBits() & aBits);
 }
 
 void
 Element::NoteDirtySubtreeForServo()
 {
   MOZ_ASSERT(IsInComposedDoc());