diff --git a/htmlparser/src/nsHTMLTokenizer.cpp b/htmlparser/src/nsHTMLTokenizer.cpp index 36903ca77dff..56210fcf8ba4 100644 --- a/htmlparser/src/nsHTMLTokenizer.cpp +++ b/htmlparser/src/nsHTMLTokenizer.cpp @@ -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 diff --git a/parser/htmlparser/src/nsHTMLTokenizer.cpp b/parser/htmlparser/src/nsHTMLTokenizer.cpp index 36903ca77dff..56210fcf8ba4 100644 --- a/parser/htmlparser/src/nsHTMLTokenizer.cpp +++ b/parser/htmlparser/src/nsHTMLTokenizer.cpp @@ -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