Bug 645115 - Flush tree ops in the fragment case when the tree builder yields due to a script. r=bzbarsky.
This commit is contained in:
@@ -533,6 +533,12 @@ nsHtml5Parser::ParseHtml5Fragment(const nsAString& aSourceBuffer,
|
||||
lastWasCR = PR_FALSE;
|
||||
if (buffer.hasMore()) {
|
||||
lastWasCR = mTokenizer->tokenizeBuffer(&buffer);
|
||||
if (mTreeBuilder->HasScript()) {
|
||||
// Flush on each script, because the execution prevention code
|
||||
// can handle at most one script per flush.
|
||||
mTreeBuilder->Flush(); // Move ops to the executor
|
||||
mExecutor->FlushDocumentWrite(); // run the ops
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user