From a60a14636fbc2e502c9ba04a0b2cdec86ffea96e Mon Sep 17 00:00:00 2001 From: "warren%netscape.com" Date: Sat, 6 Mar 1999 03:56:24 +0000 Subject: [PATCH] Fixed multiple mRefCnt problem. --- layout/html/table/src/nsTableCellFrame.cpp | 21 +-------------------- layout/html/table/src/nsTableCellFrame.h | 2 +- layout/tables/nsTableCellFrame.cpp | 21 +-------------------- layout/tables/nsTableCellFrame.h | 2 +- 4 files changed, 4 insertions(+), 42 deletions(-) diff --git a/layout/html/table/src/nsTableCellFrame.cpp b/layout/html/table/src/nsTableCellFrame.cpp index 706fd884ca5f..194661e535db 100644 --- a/layout/html/table/src/nsTableCellFrame.cpp +++ b/layout/html/table/src/nsTableCellFrame.cpp @@ -50,12 +50,6 @@ static const PRBool gsDebug = PR_FALSE; static const PRBool gsDebugNT = PR_FALSE; #endif - - -NS_IMPL_ADDREF(nsTableCellFrame) -NS_IMPL_RELEASE(nsTableCellFrame) - - NS_IMETHODIMP nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIContent* aContent, @@ -874,20 +868,7 @@ NS_METHOD nsTableCellFrame::DidSetStyleContext(nsIPresContext* aPresContext) return NS_OK; } - -NS_METHOD -nsTableCellFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) -{ - NS_PRECONDITION(0 != aInstancePtr, "null ptr"); - if (NULL == aInstancePtr) { - return NS_ERROR_NULL_POINTER; - } - if (aIID.Equals(nsITableCellLayout::GetIID())) { - *aInstancePtr = (void*)(nsISupports*)(nsITableCellLayout*)this; - return NS_OK; - } - return nsContainerFrame::QueryInterface(aIID, aInstancePtr); -} +NS_IMPL_ISUPPORTS_INHERITED(nsTableCellFrame, nsHTMLContainerFrame, nsITableCellLayout) /* ----- global methods ----- */ diff --git a/layout/html/table/src/nsTableCellFrame.h b/layout/html/table/src/nsTableCellFrame.h index ed3c046142af..22050f7472f4 100644 --- a/layout/html/table/src/nsTableCellFrame.h +++ b/layout/html/table/src/nsTableCellFrame.h @@ -44,7 +44,7 @@ class nsTableCellFrame : public nsHTMLContainerFrame, nsITableCellLayout public: // nsISupports - NS_DECL_ISUPPORTS + NS_DECL_ISUPPORTS_INHERITED // default constructor supplied by the compiler diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index 706fd884ca5f..194661e535db 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -50,12 +50,6 @@ static const PRBool gsDebug = PR_FALSE; static const PRBool gsDebugNT = PR_FALSE; #endif - - -NS_IMPL_ADDREF(nsTableCellFrame) -NS_IMPL_RELEASE(nsTableCellFrame) - - NS_IMETHODIMP nsTableCellFrame::Init(nsIPresContext& aPresContext, nsIContent* aContent, @@ -874,20 +868,7 @@ NS_METHOD nsTableCellFrame::DidSetStyleContext(nsIPresContext* aPresContext) return NS_OK; } - -NS_METHOD -nsTableCellFrame::QueryInterface(const nsIID& aIID, void** aInstancePtr) -{ - NS_PRECONDITION(0 != aInstancePtr, "null ptr"); - if (NULL == aInstancePtr) { - return NS_ERROR_NULL_POINTER; - } - if (aIID.Equals(nsITableCellLayout::GetIID())) { - *aInstancePtr = (void*)(nsISupports*)(nsITableCellLayout*)this; - return NS_OK; - } - return nsContainerFrame::QueryInterface(aIID, aInstancePtr); -} +NS_IMPL_ISUPPORTS_INHERITED(nsTableCellFrame, nsHTMLContainerFrame, nsITableCellLayout) /* ----- global methods ----- */ diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index ed3c046142af..22050f7472f4 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -44,7 +44,7 @@ class nsTableCellFrame : public nsHTMLContainerFrame, nsITableCellLayout public: // nsISupports - NS_DECL_ISUPPORTS + NS_DECL_ISUPPORTS_INHERITED // default constructor supplied by the compiler