fixed a memory leak on a style context

This commit is contained in:
buster%netscape.com 1998-08-01 02:30:35 +00:00
parent d16438323f
commit 705f18b571
2 changed files with 6 additions and 4 deletions

View File

@ -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);

View File

@ -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);