Bug 1359995: Add back the null-check on curData. r?heycam
I removed it, but seems it can be hit. It'd be nice to have a test-case where it
fails though...
MozReview-Commit-ID: 7Xa3dNHwFMn
--- a/layout/base/RestyleTracker.h
+++ b/layout/base/RestyleTracker.h
@@ -345,17 +345,19 @@ RestyleTracker::AddPendingRestyle(Elemen
// the descendant.
RestyleData* curData;
mPendingRestyles.Get(cur, &curData);
// Even if cur has a ForceDescendants restyle hint, we're not guaranteed
// to reach aElement in the case the PresShell posts a restyle event from
// PostRecreateFramesFor, so we need to track it here.
MOZ_ASSERT(curData, "expected to find a RestyleData for cur");
- curData->mDescendants.AppendElement(aElement);
+ if (curData) {
+ curData->mDescendants.AppendElement(aElement);
+ }
}
}
mHaveLaterSiblingRestyles =
mHaveLaterSiblingRestyles || (aRestyleHint & eRestyle_LaterSiblings) != 0;
return hadRestyleLaterSiblings;
}