From ebca89a38b60a51157300ba1ea8c7498d7c2b042 Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Sat, 18 Mar 2000 06:48:09 +0000 Subject: [PATCH] Fix for 32263 Create a new instance of the DTD when called by the JS engine ( only when creating a new parser context ). r=rickg. git-svn-id: svn://10.0.0.236/trunk@63381 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/htmlparser/src/nsParser.cpp | 3 +-- mozilla/parser/htmlparser/src/nsParser.cpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/mozilla/htmlparser/src/nsParser.cpp b/mozilla/htmlparser/src/nsParser.cpp index 703200e159a..c275743e6f5 100644 --- a/mozilla/htmlparser/src/nsParser.cpp +++ b/mozilla/htmlparser/src/nsParser.cpp @@ -958,14 +958,13 @@ aContentType,PRBool aVerifyEnabled,PRBool aLastCall,eParseMode aMode){ eAutoDetectResult theStatus=eUnknownDetect; if(mParserContext && (mParserContext->mSourceType==aContentType)) { - theDTD=mParserContext->mDTD; + mParserContext->mDTD->CreateNewInstance(&theDTD); // To fix bug 32263 theStatus=mParserContext->mAutoDetectStatus; //added this to fix bug 32022. } pc=new CParserContext(theScanner,aKey, 0,theDTD,theStatus,aLastCall); - if(pc && theScanner) { PushContext(*pc); diff --git a/mozilla/parser/htmlparser/src/nsParser.cpp b/mozilla/parser/htmlparser/src/nsParser.cpp index 703200e159a..c275743e6f5 100644 --- a/mozilla/parser/htmlparser/src/nsParser.cpp +++ b/mozilla/parser/htmlparser/src/nsParser.cpp @@ -958,14 +958,13 @@ aContentType,PRBool aVerifyEnabled,PRBool aLastCall,eParseMode aMode){ eAutoDetectResult theStatus=eUnknownDetect; if(mParserContext && (mParserContext->mSourceType==aContentType)) { - theDTD=mParserContext->mDTD; + mParserContext->mDTD->CreateNewInstance(&theDTD); // To fix bug 32263 theStatus=mParserContext->mAutoDetectStatus; //added this to fix bug 32022. } pc=new CParserContext(theScanner,aKey, 0,theDTD,theStatus,aLastCall); - if(pc && theScanner) { PushContext(*pc);