mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-08 12:22:34 +00:00
Bug 574529: When determining layout-flushing-safety, ignore IsSafeToRunScript if we aren't able to run script in the first place. r=bz a=blocking
This commit is contained in:
parent
27016c473f
commit
68aab64df6
@ -4722,7 +4722,12 @@ PresShell::FlushPendingNotifications(mozFlushType aType)
|
||||
NS_ASSERTION(aType >= Flush_Frames, "Why did we get called?");
|
||||
|
||||
PRBool isSafeToFlush = IsSafeToFlush();
|
||||
isSafeToFlush = isSafeToFlush && nsContentUtils::IsSafeToRunScript();
|
||||
|
||||
// If layout could possibly trigger scripts, then it's only safe to flush if
|
||||
// it's safe to run script.
|
||||
if (mDocument->GetScriptGlobalObject()) {
|
||||
isSafeToFlush = isSafeToFlush && nsContentUtils::IsSafeToRunScript();
|
||||
}
|
||||
|
||||
NS_ASSERTION(!isSafeToFlush || mViewManager, "Must have view manager");
|
||||
// Make sure the view manager stays alive while batching view updates.
|
||||
|
Loading…
Reference in New Issue
Block a user