Bug 1436625: Whitelist the assertion for the throttled animation flush. r?hiro draft
authorEmilio Cobos Álvarez <emilio@crisal.io>
Tue, 13 Feb 2018 20:57:48 +0100
changeset 754807 1fc9ef06a1563e58ceb77342fe2ff99600add88d
parent 754806 67312c67d4dffacba9f6d424e4f359a753de83eb
child 754808 f6d84dc14601a00c28a44db3a0015fc65fc88c40
push id99007
push userbmo:emilio@crisal.io
push dateWed, 14 Feb 2018 10:55:56 +0000
reviewershiro
bugs1436625
milestone60.0a1
Bug 1436625: Whitelist the assertion for the throttled animation flush. r?hiro MozReview-Commit-ID: 6StJjbH5Y59
layout/base/ServoRestyleManager.cpp
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -1094,17 +1094,23 @@ ServoRestyleManager::SnapshotFor(Element
 }
 
 void
 ServoRestyleManager::DoProcessPendingRestyles(ServoTraversalFlags aFlags)
 {
   nsPresContext* presContext = PresContext();
 
   MOZ_ASSERT(presContext->Document(), "No document?  Pshaw!");
-  MOZ_ASSERT(!presContext->HasPendingMediaQueryUpdates(),
+  // FIXME(emilio): In the "flush animations" case, ideally, we should only
+  // 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) ||
+             !presContext->HasPendingMediaQueryUpdates(),
              "Someone forgot to update media queries?");
   MOZ_ASSERT(!nsContentUtils::IsSafeToRunScript(), "Missing a script blocker!");
   MOZ_ASSERT(!mInStyleRefresh, "Reentrant call?");
 
 
   if (MOZ_UNLIKELY(!presContext->PresShell()->DidInitialize())) {
     // PresShell::FlushPendingNotifications doesn't early-return in the case
     // where the PresShell hasn't yet been initialized (and therefore we haven't