Bug 478699 - Tell the scanner it's incremental so we don't preload partial tokens. r+sr=jst a=blocking1.9.1+
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 17 Feb 2009 14:59:49 -0800
changeset 23290 40818c0d61d3
parent 23289 b726c4d67efc
child 23291 9aaeb279e657
push id698
push usermrbkap@mozilla.com
push dateTue, 17 Feb 2009 23:12:00 +0000
reviewersblocking1
bugs478699
milestone1.9.1b3pre
Bug 478699 - Tell the scanner it's incremental so we don't preload partial tokens. r+sr=jst a=blocking1.9.1+
parser/htmlparser/src/nsParser.cpp
--- a/parser/htmlparser/src/nsParser.cpp
+++ b/parser/htmlparser/src/nsParser.cpp
@@ -484,16 +484,17 @@ nsSpeculativeScriptThread::StartParsing(
   nsCAutoString charset;
   PRInt32 source;
   aParser->GetDocumentCharset(charset, source);
 
   mScanner = new nsScanner(toScan, charset, source);
   if (!mScanner) {
     return NS_ERROR_OUT_OF_MEMORY;
   }
+  mScanner->SetIncremental(PR_TRUE);
 
   mDocument.swap(doc);
   mKeepParsing = PR_TRUE;
   mCurrentlyParsing = PR_TRUE;
   mContext = context;
   return aParser->ThreadPool()->Dispatch(this, NS_DISPATCH_NORMAL);
 }