Bug 1528613 - Downgrade two assertions from release assert for now. r=heycam, a=lizzard
authorEmilio Cobos Álvarez <emilio@crisal.io>
Mon, 18 Feb 2019 00:30:17 +0000
changeset 516049 6c01930800a7e32d1a94c4e32cbfe349348a351c
parent 516048 e4f640b123bbcdd59396be184689db5dd0c6d69f
child 516050 1deedd79bc677008e17dc9197a0b7b3cbcb30649
push id1953
push userffxbld-merge
push dateMon, 11 Mar 2019 12:10:20 +0000
treeherdermozilla-release@9c35dcbaa899 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam, lizzard
bugs1528613
milestone66.0
Bug 1528613 - Downgrade two assertions from release assert for now. r=heycam, a=lizzard These assertions can happen in certain circumstances (see the referenced bug). These assertions are not security sensitive, but they affect correctness. They're old (from before my change), so I prefer dealing with them in a public bug and stop crashing release for now. Differential Revision: https://phabricator.services.mozilla.com/D20105
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -2957,17 +2957,20 @@ bool RestyleManager::ProcessPostTraversa
 void RestyleManager::ClearSnapshots() {
   for (auto iter = mSnapshots.Iter(); !iter.Done(); iter.Next()) {
     iter.Key()->UnsetFlags(ELEMENT_HAS_SNAPSHOT | ELEMENT_HANDLED_SNAPSHOT);
     iter.Remove();
   }
 }
 
 ServoElementSnapshot& RestyleManager::SnapshotFor(Element& aElement) {
-  MOZ_RELEASE_ASSERT(!mInStyleRefresh);
+  // FIXME(emilio, bug 1528644): This can actually happen, and cause observable
+  // behavior differences. Upgrade to a release assert when bug 1528644 is
+  // fixed.
+  MOZ_ASSERT(!mInStyleRefresh);
 
   // NOTE(emilio): We can handle snapshots from a one-off restyle of those that
   // we do to restyle stuff for reconstruction, for example.
   //
   // It seems to be the case that we always flush in between that happens and
   // the next attribute change, so we can assert that we haven't handled the
   // snapshot here yet. If this assertion didn't hold, we'd need to unset that
   // flag from here too.
@@ -3173,17 +3176,20 @@ void RestyleManager::UpdateOnlyAnimation
     return;
   }
 
   DoProcessPendingRestyles(ServoTraversalFlags::FlushThrottledAnimations);
 }
 
 void RestyleManager::ContentStateChanged(nsIContent* aContent,
                                          EventStates aChangedBits) {
-  MOZ_RELEASE_ASSERT(!mInStyleRefresh);
+  // FIXME(emilio, bug 1528644): This can actually happen, and cause observable
+  // behavior differences. Upgrade to a release assert when bug 1528644 is
+  // fixed.
+  MOZ_ASSERT(!mInStyleRefresh);
 
   if (!aContent->IsElement()) {
     return;
   }
 
   Element& element = *aContent->AsElement();
   if (!element.HasServoData()) {
     return;