Skip to content

Commit

Permalink
Bug 1146103 - Use NS_WARNING instead of MOZ_ASSERT for bcoord check i…
Browse files Browse the repository at this point in the history
…n ruby text container. r=dbaron

--HG--
extra : source : b0392b1184e2ab066399e6f38e06212ef1c53c18
  • Loading branch information
upsuper committed Mar 31, 2015
1 parent e42f820 commit 4d19e08
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion layout/generic/nsRubyTextContainerFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ nsRubyTextContainerFrame::Reflow(nsPresContext* aPresContext,
maxBCoord = std::max(maxBCoord, blockEnd);
}

MOZ_ASSERT(minBCoord <= maxBCoord || mFrames.IsEmpty());
LogicalSize size(lineWM, mISize, 0);
if (!mFrames.IsEmpty()) {
if (MOZ_UNLIKELY(minBCoord > maxBCoord)) {
NS_WARNING("bad block coord");
minBCoord = maxBCoord = 0;
}
size.BSize(lineWM) = maxBCoord - minBCoord;
nscoord containerWidth = size.Width(lineWM);
for (nsFrameList::Enumerator e(mFrames); !e.AtEnd(); e.Next()) {
Expand Down

0 comments on commit 4d19e08

Please sign in to comment.