diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index b501b21a10a..6dd6a290628 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -1066,7 +1066,7 @@ nsContainerFrame::FinishReflowChild(nsIFrame* aKidFrame, aKidFrame->DidReflow(aPresContext, aReflowState, nsDidReflowStatus::FINISHED); } -nsresult +void nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsOverflowAreas& aOverflowRects, @@ -1112,7 +1112,7 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres } } if (!overflowContainers) { - return NS_OK; // nothing to reflow + return; // nothing to reflow } nsOverflowContinuationTracker tracker(this, false, false); @@ -1175,7 +1175,9 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres // used to be a normal next-in-flow; steal it from the child list nsresult rv = static_cast(nif->GetParent()) ->StealFrame(nif); - NS_ENSURE_SUCCESS(rv, rv); + if (NS_FAILED(rv)) { + return; + } } tracker.Insert(nif, frameStatus); @@ -1192,8 +1194,6 @@ nsContainerFrame::ReflowOverflowContainerChildren(nsPresContext* aPres } ConsiderChildOverflow(aOverflowRects, frame); } - - return NS_OK; } void diff --git a/layout/generic/nsContainerFrame.h b/layout/generic/nsContainerFrame.h index 49047e32a57..81d8787b5b2 100644 --- a/layout/generic/nsContainerFrame.h +++ b/layout/generic/nsContainerFrame.h @@ -291,11 +291,11 @@ public: * * (aFlags just gets passed through to ReflowChild) */ - nsresult ReflowOverflowContainerChildren(nsPresContext* aPresContext, - const nsHTMLReflowState& aReflowState, - nsOverflowAreas& aOverflowRects, - uint32_t aFlags, - nsReflowStatus& aStatus); + void ReflowOverflowContainerChildren(nsPresContext* aPresContext, + const nsHTMLReflowState& aReflowState, + nsOverflowAreas& aOverflowRects, + uint32_t aFlags, + nsReflowStatus& aStatus); /** * Move any frames on our overflow list to the end of our principal list.