Too many bugs to mention; tables, skipped content; perf; memory

This commit is contained in:
rickg@netscape.com
1998-08-21 02:04:39 +00:00
parent 627a2f316f
commit 625c142b00
8 changed files with 356 additions and 188 deletions
+11 -13
View File
@@ -395,10 +395,8 @@ PRInt32 nsParser::DidBuildModel(PRInt32 anErrorCode) {
if(mParserContext->mDTD) {
result=mParserContext->mDTD->DidBuildModel(anErrorCode,PRBool(0==mParserContext->mPrevContext));
//Now it's time to recycle our used tokens.
//The current context has a deque full of them,
//and the ones that preceed currentpos are no
//longer needed. Let's recycle them.
//Now recycle any tokens that are still hanging around.
//Come to think of it, there really shouldn't be any.
nsDeque& theDeque=mParserContext->mTokenDeque;
nsITokenRecycler* theRecycler=mParserContext->mDTD->GetTokenRecycler();
if(theRecycler) {
@@ -588,25 +586,25 @@ PRInt32 nsParser::BuildModel() {
theRootDTD->Verify(kEmptyString);
}
if(kInterrupted==result) {
*mParserContext->mCurrentPos=theMarkPos;
//Now it's time to recycle our used tokens.
//The current context has a deque full of them,
//and the ones that preceed currentpos are no
//longer needed. Let's recycle them.
nsITokenRecycler* theRecycler=theRootDTD->GetTokenRecycler();
if(theRecycler) {
nsDeque& theDeque=mParserContext->mTokenDeque;
CToken* theCurrentToken=(CToken*)mParserContext->mCurrentPos->GetCurrent();
nsITokenRecycler* theRecycler=theRootDTD->GetTokenRecycler();
if(theRecycler) {
nsDeque& theDeque=mParserContext->mTokenDeque;
CToken* theCurrentToken=(CToken*)mParserContext->mCurrentPos->GetCurrent();
for(;;) {
CToken* theToken=(CToken*)theDeque.Peek();
while(theToken && (theToken!=theCurrentToken)) {
if(theToken && (theToken!=theCurrentToken)){
theDeque.Pop();
theRecycler->RecycleToken(theToken);
}
else break;
}
mParserContext->mCurrentPos->First();
}
return result;
}