38601 - Calling DidBuildModel(), through nsParser::Terminate(),
        for documents stopped abruptly ( stopped before a complete load ).
Fixed a few warnings.
r=nisheeth


git-svn-id: svn://10.0.0.236/trunk@69863 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
harishd%netscape.com
2000-05-15 21:08:57 +00:00
parent 7223f6a8e3
commit 0389aba1fa
8 changed files with 18 additions and 18 deletions

View File

@@ -1105,11 +1105,7 @@ nsresult CNavDTD::WillHandleStartTag(CToken* aToken,eHTMLTags aTag,nsCParserNode
CObserverService* theService=mParser->GetObserverService();
if(theService) {
CParserContext* pc=mParser->PeekContext();
void* theDocID=(pc)? pc->mKey:0;
const nsISupportsParserBundle* bundle=mParser->GetParserBundle();
result=theService->Notify(aTag,aNode,(void*)bundle, NS_ConvertToString(kHTMLTextContentType), mParser);
}
}

View File

@@ -856,7 +856,7 @@ CToken* CTokenRecycler::CreateTokenOfType(eHTMLTokenTypes aType,eHTMLTags aTag)
CNodeRecycler::CNodeRecycler(): mSharedNodes(0) {
MOZ_COUNT_CTOR(CTokenRecycler);
MOZ_COUNT_CTOR(CNodeRecycler);
#ifdef NS_DEBUG
gNodeCount=0;
@@ -865,7 +865,7 @@ CNodeRecycler::CNodeRecycler(): mSharedNodes(0) {
CNodeRecycler::~CNodeRecycler() {
MOZ_COUNT_DTOR(CTokenRecycler);
MOZ_COUNT_DTOR(CNodeRecycler);
nsCParserNode* theNode=0;

View File

@@ -1049,9 +1049,13 @@ void nsParser::SetUnusedInput(nsString& aBuffer) {
*/
nsresult nsParser::Terminate(void){
nsresult result=NS_OK;
if(mParserContext && mParserContext->mDTD)
if(mParserContext && mParserContext->mDTD) {
result=mParserContext->mDTD->Terminate();
mInternalState=result;
if(result==NS_ERROR_HTMLPARSER_STOPPARSING) {
mInternalState=result;
result=DidBuildModel(result);
}
}
return result;
}

View File

@@ -428,7 +428,7 @@ public:
NS_DECL_ISUPPORTS
nsParserBundle ();
~nsParserBundle ();
virtual ~nsParserBundle ();
/**
* Retrieve data from the bundle by IID.

View File

@@ -1105,11 +1105,7 @@ nsresult CNavDTD::WillHandleStartTag(CToken* aToken,eHTMLTags aTag,nsCParserNode
CObserverService* theService=mParser->GetObserverService();
if(theService) {
CParserContext* pc=mParser->PeekContext();
void* theDocID=(pc)? pc->mKey:0;
const nsISupportsParserBundle* bundle=mParser->GetParserBundle();
result=theService->Notify(aTag,aNode,(void*)bundle, NS_ConvertToString(kHTMLTextContentType), mParser);
}
}

View File

@@ -856,7 +856,7 @@ CToken* CTokenRecycler::CreateTokenOfType(eHTMLTokenTypes aType,eHTMLTags aTag)
CNodeRecycler::CNodeRecycler(): mSharedNodes(0) {
MOZ_COUNT_CTOR(CTokenRecycler);
MOZ_COUNT_CTOR(CNodeRecycler);
#ifdef NS_DEBUG
gNodeCount=0;
@@ -865,7 +865,7 @@ CNodeRecycler::CNodeRecycler(): mSharedNodes(0) {
CNodeRecycler::~CNodeRecycler() {
MOZ_COUNT_DTOR(CTokenRecycler);
MOZ_COUNT_DTOR(CNodeRecycler);
nsCParserNode* theNode=0;

View File

@@ -1049,9 +1049,13 @@ void nsParser::SetUnusedInput(nsString& aBuffer) {
*/
nsresult nsParser::Terminate(void){
nsresult result=NS_OK;
if(mParserContext && mParserContext->mDTD)
if(mParserContext && mParserContext->mDTD) {
result=mParserContext->mDTD->Terminate();
mInternalState=result;
if(result==NS_ERROR_HTMLPARSER_STOPPARSING) {
mInternalState=result;
result=DidBuildModel(result);
}
}
return result;
}

View File

@@ -428,7 +428,7 @@ public:
NS_DECL_ISUPPORTS
nsParserBundle ();
~nsParserBundle ();
virtual ~nsParserBundle ();
/**
* Retrieve data from the bundle by IID.