mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-13 10:25:01 +00:00
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:
parent
41139b5617
commit
614350e5e5
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user