Bug 1042587 - Rework script blocker check for SVG (r=roc)

This commit is contained in:
Bill McCloskey 2014-08-05 21:44:59 -07:00
parent b63cf9051e
commit 4b38e66ba3

View File

@ -1896,13 +1896,13 @@ nsPresContext::MediaFeatureValuesChanged(StyleRebuildType aShouldRebuild,
mPendingViewportChange = false;
if (!nsContentUtils::IsSafeToRunScript()) {
NS_ABORT_IF_FALSE(mDocument->IsBeingUsedAsImage(),
"How did we get here? Are we failing to notify "
"listeners that we should notify?");
if (mDocument->IsBeingUsedAsImage()) {
MOZ_ASSERT(PR_CLIST_IS_EMPTY(&mDOMMediaQueryLists));
return;
}
MOZ_ASSERT(nsContentUtils::IsSafeToRunScript());
// Media query list listeners should be notified from a queued task
// (in HTML5 terms), although we also want to notify them on certain
// flushes. (We're already running off an event.)