bug 522779: use nsTArray::Contains() instead of checking nsTArray::IndexOf() against various sentinel values, in three places in layout. r=dbaron

This commit is contained in:
Daniel Holbert
2009-10-16 15:49:30 -07:00
parent 9d9136ce19
commit 0ec39376f1
3 changed files with 3 additions and 4 deletions

View File

@@ -6973,7 +6973,7 @@ DoDeletingFrameSubtree(nsFrameManager* aFrameManager,
// the out-of-flow frame will be destroyed by aRemovedFrame.
if (outOfFlowFrame->GetStyleDisplay()->mDisplay == NS_STYLE_DISPLAY_POPUP ||
!nsLayoutUtils::IsProperAncestorFrame(aRemovedFrame, outOfFlowFrame)) {
NS_ASSERTION(aDestroyQueue.IndexOf(outOfFlowFrame) == kNotFound,
NS_ASSERTION(!aDestroyQueue.Contains(outOfFlowFrame),
"out-of-flow is already in the destroy queue");
aDestroyQueue.AppendElement(outOfFlowFrame);
// Recurse into the out-of-flow, it is now the aRemovedFrame.