Bug 1400936: Remove dumb null check. r?bholley draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Sat, 23 Sep 2017 00:02:30 +0200
changeset 669430 e2b5747346b787bcc89d75716d300656d057b7b3
parent 669429 08e7d627c2017392af5ba26086e682a61cbc88dd
child 669431 f2186b245fc1119734e708e8ae6df313fd78094b
push id81323
push userbmo:emilio@crisal.io
push dateSat, 23 Sep 2017 02:54:45 +0000
reviewersbholley
bugs1400936
milestone58.0a1
Bug 1400936: Remove dumb null check. r?bholley MozReview-Commit-ID: CLs2UcA8DF9 Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
dom/base/Element.cpp
--- 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