From 636f37816dc22b0c7b3e98fc4abe66f5b715c117 Mon Sep 17 00:00:00 2001 From: "kmcclusk%netscape.com" Date: Fri, 10 May 2002 01:25:41 +0000 Subject: [PATCH] Move logic in nsHTMLFrameInnerFrame's destroy to nsHTMLFrameInnerFrame:Destroy so its contents are destroyed *before* nsHTMLFrameInnerFrame is destroyed. bug=66748 r=jkeiser@netscape.com sr=attinasi@netscape.com git-svn-id: svn://10.0.0.236/trunk@121235 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsFrameFrame.cpp | 9 ++++++--- mozilla/layout/html/document/src/nsFrameFrame.cpp | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 72ece605648..e810ea621ca 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -210,6 +210,8 @@ public: NS_IMETHOD GetFrameType(nsIAtom** aType) const; + NS_IMETHOD Destroy(nsIPresContext* aPresContext); + /** * @see nsIFrame::Paint */ @@ -254,8 +256,6 @@ protected: nsresult CreateViewAndWidget(nsIPresContext* aPresContext, nsIWidget** aWidget); - virtual ~nsHTMLFrameInnerFrame(); - virtual void GetDesiredSize(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsHTMLReflowMetrics& aDesiredSize); @@ -693,7 +693,8 @@ nsHTMLFrameInnerFrame::nsHTMLFrameInnerFrame() { } -nsHTMLFrameInnerFrame::~nsHTMLFrameInnerFrame() +NS_IMETHODIMP +nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext) { if (mFrameLoader) { // Get the content viewer through the docshell, but don't call @@ -721,6 +722,8 @@ nsHTMLFrameInnerFrame::~nsHTMLFrameInnerFrame() mFrameLoader->Destroy(); } + + return nsLeafFrame::Destroy(aPresContext); } PRBool nsHTMLFrameInnerFrame::GetURL(nsIContent* aContent, nsString& aResult) diff --git a/mozilla/layout/html/document/src/nsFrameFrame.cpp b/mozilla/layout/html/document/src/nsFrameFrame.cpp index 72ece605648..e810ea621ca 100644 --- a/mozilla/layout/html/document/src/nsFrameFrame.cpp +++ b/mozilla/layout/html/document/src/nsFrameFrame.cpp @@ -210,6 +210,8 @@ public: NS_IMETHOD GetFrameType(nsIAtom** aType) const; + NS_IMETHOD Destroy(nsIPresContext* aPresContext); + /** * @see nsIFrame::Paint */ @@ -254,8 +256,6 @@ protected: nsresult CreateViewAndWidget(nsIPresContext* aPresContext, nsIWidget** aWidget); - virtual ~nsHTMLFrameInnerFrame(); - virtual void GetDesiredSize(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsHTMLReflowMetrics& aDesiredSize); @@ -693,7 +693,8 @@ nsHTMLFrameInnerFrame::nsHTMLFrameInnerFrame() { } -nsHTMLFrameInnerFrame::~nsHTMLFrameInnerFrame() +NS_IMETHODIMP +nsHTMLFrameInnerFrame::Destroy(nsIPresContext* aPresContext) { if (mFrameLoader) { // Get the content viewer through the docshell, but don't call @@ -721,6 +722,8 @@ nsHTMLFrameInnerFrame::~nsHTMLFrameInnerFrame() mFrameLoader->Destroy(); } + + return nsLeafFrame::Destroy(aPresContext); } PRBool nsHTMLFrameInnerFrame::GetURL(nsIContent* aContent, nsString& aResult)