From 7fb0cc9b2e2f89ab7e19c8f1915187f6e9702138 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Wed, 28 May 2014 19:36:59 +0000 Subject: [PATCH] Bug 1015781 - part 8, Make nsTableCellFrame::AppendFrames/InsertFrames/RemoveFrame DEBUG only. r=roc --- layout/tables/nsTableCellFrame.cpp | 9 +++++---- layout/tables/nsTableCellFrame.h | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index eafa35179c3..b7d28733cdd 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -240,12 +240,12 @@ nsTableCellFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext) } } - +#ifdef DEBUG void nsTableCellFrame::AppendFrames(ChildListID aListID, nsFrameList& aFrameList) { - NS_PRECONDITION(false, "unsupported operation"); + MOZ_CRASH("unsupported operation"); } void @@ -253,15 +253,16 @@ nsTableCellFrame::InsertFrames(ChildListID aListID, nsIFrame* aPrevFrame, nsFrameList& aFrameList) { - NS_PRECONDITION(false, "unsupported operation"); + MOZ_CRASH("unsupported operation"); } void nsTableCellFrame::RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) { - NS_PRECONDITION(false, "unsupported operation"); + MOZ_CRASH("unsupported operation"); } +#endif void nsTableCellFrame::SetColIndex(int32_t aColIndex) { diff --git a/layout/tables/nsTableCellFrame.h b/layout/tables/nsTableCellFrame.h index 7cfba9e0f23..7d8bf180716 100644 --- a/layout/tables/nsTableCellFrame.h +++ b/layout/tables/nsTableCellFrame.h @@ -60,9 +60,9 @@ public: /** @see nsIFrame::DidSetStyleContext */ virtual void DidSetStyleContext(nsStyleContext* aOldStyleContext) MOZ_OVERRIDE; - // table cells contain a block frame which does most of the work, and - // so these functions should never be called. They assert and return - // NS_ERROR_NOT_IMPLEMENTED +#ifdef DEBUG + // Our anonymous block frame is the content insertion frame so these + // methods should never be called: virtual void AppendFrames(ChildListID aListID, nsFrameList& aFrameList) MOZ_OVERRIDE; virtual void InsertFrames(ChildListID aListID, @@ -70,6 +70,7 @@ public: nsFrameList& aFrameList) MOZ_OVERRIDE; virtual void RemoveFrame(ChildListID aListID, nsIFrame* aOldFrame) MOZ_OVERRIDE; +#endif virtual nsContainerFrame* GetContentInsertionFrame() MOZ_OVERRIDE { return GetFirstPrincipalChild()->GetContentInsertionFrame();