Bug 1400936: Remove dumb null check. r?bholley
MozReview-Commit-ID: CLs2UcA8DF9
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
--- a/dom/base/Element.cpp
+++ b/dom/base/Element.cpp
@@ -4189,20 +4189,17 @@ Element::ClearServoData(nsIDocument* aDo
MOZ_ASSERT(aDoc);
#ifdef MOZ_STYLO
Servo_Element_ClearData(this);
// Since this element is losing its servo data, nothing under it may have
// servo data either, so we can forget restyles rooted at this element. This
// is necessary for correctness, since we invoke ClearServoData in various
// places where an element's flattened tree parent changes, and such a change
// may also make an element invalid to be used as a restyle root.
- //
- // Note that we need to null-check aDoc, which may be null in some situations
- // when invoked from UnbindFromTree.
- if (aDoc && aDoc->GetServoRestyleRoot() == this) {
+ if (aDoc->GetServoRestyleRoot() == this) {
aDoc->ClearServoRestyleRoot();
}
#else
MOZ_CRASH("Accessing servo node data in non-stylo build");
#endif
}
void