Bug 1545842 - Downgrade RestyleManager assertions to DIAGNOSTIC_ASSERT in beta. r=tnikkel a=jcristau
authorEmilio Cobos Álvarez <emilio@crisal.io>
Fri, 19 Apr 2019 23:32:36 +0300
changeset 536432 5d6b91a3b5365903cd7d2c48bf32f62e50bff46a
parent 536431 3e3ebfd849558d6011dec7b53ea5942ba1da8867
child 536433 0fa8984d53a3c816d6b841d3141cba963c8a99a8
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstnikkel, jcristau
Bug 1545842 - Downgrade RestyleManager assertions to DIAGNOSTIC_ASSERT in beta. r=tnikkel a=jcristau The only case where we know that this assert breaks right now is in nsIconChannel. nsIconChannel is used for moz-icon://, which is not exposed to content. So it doesn't seem to be easy to potentially get into a broken state that content could exploit, and thus crashes in release may be a bit excessive. Downgrade the assertion for now. Differential Revision: https://phabricator.services.mozilla.com//D28248
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -2990,17 +2990,17 @@ bool RestyleManager::ProcessPostTraversa
 void RestyleManager::ClearSnapshots() {
   for (auto iter = mSnapshots.Iter(); !iter.Done(); iter.Next()) {
 ServoElementSnapshot& RestyleManager::SnapshotFor(Element& aElement) {
-  MOZ_RELEASE_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.
@@ -3027,17 +3027,17 @@ void RestyleManager::DoProcessPendingRes
   // recascade animation styles running on the compositor, so we shouldn't care
   // about other styles, or new rules that apply to the page...
   // However, that's not true as of right now, see bug 1388031 and bug 1388692.
   MOZ_ASSERT((aFlags & ServoTraversalFlags::FlushThrottledAnimations) ||
              "Someone forgot to update media queries?");
   MOZ_ASSERT(!nsContentUtils::IsSafeToRunScript(), "Missing a script blocker!");
-  MOZ_RELEASE_ASSERT(!mInStyleRefresh, "Reentrant call?");
   if (MOZ_UNLIKELY(!presShell->DidInitialize())) {
     // PresShell::FlushPendingNotifications doesn't early-return in the case
     // where the PresShell hasn't yet been initialized (and therefore we haven't
     // yet done the initial style traversal of the DOM tree). We should arguably
     // fix up the callers and assert against this case, but we just detect and
     // handle it for now.
@@ -3206,17 +3206,17 @@ void RestyleManager::UpdateOnlyAnimation
 void RestyleManager::ContentStateChanged(nsIContent* aContent,
                                          EventStates aChangedBits) {
-  MOZ_RELEASE_ASSERT(!mInStyleRefresh);
   if (!aContent->IsElement()) {
   Element& element = *aContent->AsElement();
   if (!element.HasServoData()) {
@@ -3317,17 +3317,17 @@ void RestyleManager::AttributeWillChange
 void RestyleManager::ClassAttributeWillBeChangedBySMIL(Element* aElement) {
   TakeSnapshotForAttributeChange(*aElement, kNameSpaceID_None,
 void RestyleManager::TakeSnapshotForAttributeChange(Element& aElement,
                                                     int32_t aNameSpaceID,
                                                     nsAtom* aAttribute) {
-  MOZ_RELEASE_ASSERT(!mInStyleRefresh);
   if (!aElement.HasServoData()) {
   bool influencesOtherPseudoClassState;
   if (!NeedToRecordAttrChange(*StyleSet(), aElement, aNameSpaceID, aAttribute,
                               &influencesOtherPseudoClassState)) {