Remove static constructors. GetScratchString was no longer used and GetTempStack was used too rarely to be a real performance benefit. r=harishd@netscape.com sr=waterson@netscape.com b=63014

This commit is contained in:
dbaron%fas.harvard.edu 2001-01-10 04:04:08 +00:00
parent 41139b5617
commit 614350e5e5
2 changed files with 2 additions and 28 deletions

View File

@ -264,12 +264,6 @@ void nsHTMLTokenizer::PrependTokens(nsDeque& aDeque){
}
static nsDeque& GetTempStack() {
static nsDeque theTempStack(0);
return theTempStack;
}
/**
* This is a utilty method for ScanDocStructure, which finds a given
* tag in the stack.
@ -333,7 +327,7 @@ nsresult nsHTMLTokenizer::ScanDocStructure(PRBool aFinalChunk) {
theRootToken=(CHTMLToken*)mTokenDeque.ObjectAt(mTokenScanPos); //init to root
nsDeque &theStack=GetTempStack();
nsDeque theStack(0);
eHTMLTags theRootTag=eHTMLTag_unknown;
CHTMLToken *theToken=theRootToken; //init to root
PRInt32 theStackDepth=0;
@ -417,7 +411,6 @@ nsresult nsHTMLTokenizer::ScanDocStructure(PRBool aFinalChunk) {
theToken=(CHTMLToken*)mTokenDeque.ObjectAt(++mTokenScanPos);
}
theStack.Empty();
return result;
}
@ -637,12 +630,6 @@ nsresult nsHTMLTokenizer::ConsumeScriptContent(nsScanner& aScanner,CToken*& aTok
return result;
}
nsString& GetScratchString(void) {
static nsString gScratchString;
gScratchString.Truncate(0);
return gScratchString;
}
/**
*
* @update gess12/28/98

View File

@ -264,12 +264,6 @@ void nsHTMLTokenizer::PrependTokens(nsDeque& aDeque){
}
static nsDeque& GetTempStack() {
static nsDeque theTempStack(0);
return theTempStack;
}
/**
* This is a utilty method for ScanDocStructure, which finds a given
* tag in the stack.
@ -333,7 +327,7 @@ nsresult nsHTMLTokenizer::ScanDocStructure(PRBool aFinalChunk) {
theRootToken=(CHTMLToken*)mTokenDeque.ObjectAt(mTokenScanPos); //init to root
nsDeque &theStack=GetTempStack();
nsDeque theStack(0);
eHTMLTags theRootTag=eHTMLTag_unknown;
CHTMLToken *theToken=theRootToken; //init to root
PRInt32 theStackDepth=0;
@ -417,7 +411,6 @@ nsresult nsHTMLTokenizer::ScanDocStructure(PRBool aFinalChunk) {
theToken=(CHTMLToken*)mTokenDeque.ObjectAt(++mTokenScanPos);
}
theStack.Empty();
return result;
}
@ -637,12 +630,6 @@ nsresult nsHTMLTokenizer::ConsumeScriptContent(nsScanner& aScanner,CToken*& aTok
return result;
}
nsString& GetScratchString(void) {
static nsString gScratchString;
gScratchString.Truncate(0);
return gScratchString;
}
/**
*
* @update gess12/28/98