Bug 478699 - Tell the scanner it's incremental so we don't preload partial tokens. r+sr=jst
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 17 Feb 2009 14:59:49 -0800
changeset 25080 79ef13e126a5
parent 25079 f5cf71cfe64a
child 25081 81a70b157a1c
push id5402
push usermrbkap@mozilla.com
push dateTue, 17 Feb 2009 23:00:10 +0000
treeherdermozilla-central@79ef13e126a5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs478699
milestone1.9.2a1pre
Bug 478699 - Tell the scanner it's incremental so we don't preload partial tokens. r+sr=jst
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);
 }