Bug 1436625: Whitelist the assertion for the throttled animation flush. r?hiro
MozReview-Commit-ID: 6StJjbH5Y59
--- 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