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

@@ -127,7 +127,6 @@ nsHtml5TreeOperation::~nsHtml5TreeOperation()
case eTreeOpAppendCommentToDocument:
delete[] mTwo.unicharPtr;
break;
case eTreeOpSetDocumentCharset:
case eTreeOpNeedsCharsetSwitchTo:
delete[] mOne.charPtr;
break;
@@ -630,13 +629,6 @@ nsHtml5TreeOperation::Perform(nsHtml5TreeOpExecutor* aBuilder,
aBuilder->FlushPendingAppendNotifications();
return rv;
}
case eTreeOpSetDocumentCharset: {
char* str = mOne.charPtr;
PRInt32 charsetSource = mInt;
nsDependentCString dependentString(str);
aBuilder->SetDocumentCharsetAndSource(dependentString, charsetSource);
return rv;
}
case eTreeOpNeedsCharsetSwitchTo: {
char* str = mOne.charPtr;
PRInt32 charsetSource = mInt;