From 4f738fb73f34de3b297e5a12b9015ab28f6a4339 Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 26 Jan 2000 22:11:47 +0000 Subject: [PATCH] r=nisheeth@netscape.com Added asserts to help catch the case of poorly targeted reflow commands --- layout/html/table/src/nsTableFrame.cpp | 1 + layout/html/table/src/nsTableOuterFrame.cpp | 1 + layout/tables/nsTableFrame.cpp | 1 + layout/tables/nsTableOuterFrame.cpp | 1 + 4 files changed, 4 insertions(+) diff --git a/layout/html/table/src/nsTableFrame.cpp b/layout/html/table/src/nsTableFrame.cpp index 1608d75472ae..a280179bd911 100644 --- a/layout/html/table/src/nsTableFrame.cpp +++ b/layout/html/table/src/nsTableFrame.cpp @@ -2530,6 +2530,7 @@ NS_METHOD nsTableFrame::IncrementalReflow(nsIPresContext* aPresContext, // Get the next frame in the reflow chain nsIFrame* nextFrame; reflowState.reflowCommand->GetNext(nextFrame); + NS_ASSERTION(nextFrame, "next frame in reflow command is null"); // Recover our reflow state rv = IR_TargetIsChild(aPresContext, aDesiredSize, state, aStatus, nextFrame); diff --git a/layout/html/table/src/nsTableOuterFrame.cpp b/layout/html/table/src/nsTableOuterFrame.cpp index 7b11fd3f5a7a..d8082427efb2 100644 --- a/layout/html/table/src/nsTableOuterFrame.cpp +++ b/layout/html/table/src/nsTableOuterFrame.cpp @@ -327,6 +327,7 @@ nsresult nsTableOuterFrame::IncrementalReflow(nsIPresContext* aPresContex // Get the next frame in the reflow chain nsIFrame* nextFrame; aReflowState.reflowState.reflowCommand->GetNext(nextFrame); + NS_ASSERTION(nextFrame, "next frame in reflow command is null"); // Recover our reflow state RecoverState(aReflowState, nextFrame); diff --git a/layout/tables/nsTableFrame.cpp b/layout/tables/nsTableFrame.cpp index 1608d75472ae..a280179bd911 100644 --- a/layout/tables/nsTableFrame.cpp +++ b/layout/tables/nsTableFrame.cpp @@ -2530,6 +2530,7 @@ NS_METHOD nsTableFrame::IncrementalReflow(nsIPresContext* aPresContext, // Get the next frame in the reflow chain nsIFrame* nextFrame; reflowState.reflowCommand->GetNext(nextFrame); + NS_ASSERTION(nextFrame, "next frame in reflow command is null"); // Recover our reflow state rv = IR_TargetIsChild(aPresContext, aDesiredSize, state, aStatus, nextFrame); diff --git a/layout/tables/nsTableOuterFrame.cpp b/layout/tables/nsTableOuterFrame.cpp index 7b11fd3f5a7a..d8082427efb2 100644 --- a/layout/tables/nsTableOuterFrame.cpp +++ b/layout/tables/nsTableOuterFrame.cpp @@ -327,6 +327,7 @@ nsresult nsTableOuterFrame::IncrementalReflow(nsIPresContext* aPresContex // Get the next frame in the reflow chain nsIFrame* nextFrame; aReflowState.reflowState.reflowCommand->GetNext(nextFrame); + NS_ASSERTION(nextFrame, "next frame in reflow command is null"); // Recover our reflow state RecoverState(aReflowState, nextFrame);