Bug 675499 - Transfer initially sniffed document charset through the speculative load queue to avoid race conditions. r=bzbarsky.

This commit is contained in:
Henri Sivonen
2011-08-02 20:45:38 +03:00
parent d497c4fa98
commit 1fa592b573
5 changed files with 55 additions and 25 deletions

View File

@@ -643,9 +643,8 @@ void
nsHtml5TreeBuilder::SetDocumentCharset(nsACString& aCharset,
PRInt32 aCharsetSource)
{
nsHtml5TreeOperation* treeOp = mOpQueue.AppendElement();
NS_ASSERTION(treeOp, "Tree op allocation failed.");
treeOp->Init(eTreeOpSetDocumentCharset, aCharset, aCharsetSource);
mSpeculativeLoadQueue.AppendElement()->InitSetDocumentCharset(aCharset,
aCharsetSource);
}
void