From cb5c79821779e1e067e772e2c435712b0c25e521 Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Sat, 23 Mar 2013 21:10:33 +0100 Subject: [PATCH] Bug 851841 - Make nsListBoxBodyFrame::RemoveChildFrame assertions fatal. r=bzbarsky --- layout/xul/base/src/nsListBoxBodyFrame.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/layout/xul/base/src/nsListBoxBodyFrame.cpp b/layout/xul/base/src/nsListBoxBodyFrame.cpp index 5eae16af45c6..e79303ae6b5f 100644 --- a/layout/xul/base/src/nsListBoxBodyFrame.cpp +++ b/layout/xul/base/src/nsListBoxBodyFrame.cpp @@ -1466,15 +1466,8 @@ void nsListBoxBodyFrame::RemoveChildFrame(nsBoxLayoutState &aState, nsIFrame *aFrame) { - if (!mFrames.ContainsFrame(aFrame)) { - NS_ERROR("tried to remove a child frame which isn't our child"); - return; - } - - if (aFrame == GetContentInsertionFrame()) { - // Don't touch that one - return; - } + MOZ_ASSERT(mFrames.ContainsFrame(aFrame)); + MOZ_ASSERT(aFrame != GetContentInsertionFrame()); #ifdef ACCESSIBILITY nsAccessibilityService* accService = nsIPresShell::AccService();