From e06c12833e497bf2fa87c48233890bb2a8f6f6ac Mon Sep 17 00:00:00 2001 From: "harishd%netscape.com" Date: Wed, 6 Sep 2000 20:27:40 +0000 Subject: [PATCH] 50994 ( nebeta3+ ) - A recycled node was being referenced and therefore the crash. r= nisheeth --- htmlparser/src/COtherElements.h | 6 ++++-- parser/htmlparser/src/COtherElements.h | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/htmlparser/src/COtherElements.h b/htmlparser/src/COtherElements.h index d3499f13ed2..6112328a031 100644 --- a/htmlparser/src/COtherElements.h +++ b/htmlparser/src/COtherElements.h @@ -340,13 +340,15 @@ public: /********************************************************** this gets called to close a tag in the sink and in the context **********************************************************/ - virtual nsresult CloseContainerInContext(nsIParserNode *aNode,eHTMLTags aTag,nsDTDContext *aContext,nsIHTMLContentSink *aSink) { + virtual nsresult CloseContainerInContext(nsIParserNode *aNode,eHTMLTags aTag,nsDTDContext *aContext,nsIHTMLContentSink *aSink) { + nsresult result=NS_OK; if(mTag!=aTag) { CElement *theElement=GetElement(aTag); return theElement->CloseContainerInContext(aNode,aTag,aContext,aSink); } + result=CloseContainer(aNode,aTag,aContext,aSink); CloseContext(aNode,aTag,aContext,aSink); - return CloseContainer(aNode,aTag,aContext,aSink); + return result; } diff --git a/parser/htmlparser/src/COtherElements.h b/parser/htmlparser/src/COtherElements.h index d3499f13ed2..6112328a031 100644 --- a/parser/htmlparser/src/COtherElements.h +++ b/parser/htmlparser/src/COtherElements.h @@ -340,13 +340,15 @@ public: /********************************************************** this gets called to close a tag in the sink and in the context **********************************************************/ - virtual nsresult CloseContainerInContext(nsIParserNode *aNode,eHTMLTags aTag,nsDTDContext *aContext,nsIHTMLContentSink *aSink) { + virtual nsresult CloseContainerInContext(nsIParserNode *aNode,eHTMLTags aTag,nsDTDContext *aContext,nsIHTMLContentSink *aSink) { + nsresult result=NS_OK; if(mTag!=aTag) { CElement *theElement=GetElement(aTag); return theElement->CloseContainerInContext(aNode,aTag,aContext,aSink); } + result=CloseContainer(aNode,aTag,aContext,aSink); CloseContext(aNode,aTag,aContext,aSink); - return CloseContainer(aNode,aTag,aContext,aSink); + return result; }