From 705f18b571f343daafbd7c8e8f7ebbdd0e57ae78 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Sat, 1 Aug 1998 02:30:35 +0000 Subject: [PATCH] fixed a memory leak on a style context --- layout/html/table/src/nsTableRowFrame.cpp | 5 +++-- layout/tables/nsTableRowFrame.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/layout/html/table/src/nsTableRowFrame.cpp b/layout/html/table/src/nsTableRowFrame.cpp index 51bdbe69a3f0..bc570e5ac4c8 100644 --- a/layout/html/table/src/nsTableRowFrame.cpp +++ b/layout/html/table/src/nsTableRowFrame.cpp @@ -540,8 +540,9 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, { kidAvailSize.width = cellPosition->mWidth.GetCoordValue(); } - NS_RELEASE(kidSC); */ + NS_IF_RELEASE(kidSC); + // Get the child's margins nsMargin margin; nscoord topMargin = 0; @@ -575,7 +576,7 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, if (gsDebug1) printf ("%p InitR: avail=%d\n", this, kidAvailSize.width); status = ReflowChild(kidFrame, &aPresContext, kidSize, kidReflowState); if (gsDebug1) - printf ("%p InitR: desired=%d, MES=%d\n", + printf ("%p Initial Reflow: desired=%d, MES=%d\n", this, kidSize.width, kidMaxElementSize.width); ((nsTableCellFrame *)kidFrame)->SetPass1DesiredSize(kidSize); ((nsTableCellFrame *)kidFrame)->SetPass1MaxElementSize(kidMaxElementSize); diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index 51bdbe69a3f0..bc570e5ac4c8 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -540,8 +540,9 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, { kidAvailSize.width = cellPosition->mWidth.GetCoordValue(); } - NS_RELEASE(kidSC); */ + NS_IF_RELEASE(kidSC); + // Get the child's margins nsMargin margin; nscoord topMargin = 0; @@ -575,7 +576,7 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, if (gsDebug1) printf ("%p InitR: avail=%d\n", this, kidAvailSize.width); status = ReflowChild(kidFrame, &aPresContext, kidSize, kidReflowState); if (gsDebug1) - printf ("%p InitR: desired=%d, MES=%d\n", + printf ("%p Initial Reflow: desired=%d, MES=%d\n", this, kidSize.width, kidMaxElementSize.width); ((nsTableCellFrame *)kidFrame)->SetPass1DesiredSize(kidSize); ((nsTableCellFrame *)kidFrame)->SetPass1MaxElementSize(kidMaxElementSize);