Bug 1145768 - Use the right begin() iterator to compare with. r=roc

Using the wrong begin() means that RFindLineContaining would hang
in the case the frame isn't on the overflow list.  We should always
find it there though, if it wasn't found on the principal list, so
the bug is harmless apart from the assertion.
This commit is contained in:
Mats Palmgren 2015-04-09 17:57:34 +00:00
Родитель 02966b6b3c
Коммит 946b96cca9
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -5086,7 +5086,8 @@ nsBlockFrame::AddFrames(nsFrameList& aFrameList, nsIFrame* aPrevSibling)
if (overflowLines) {
prevSibLine = overflowLines->mLines.end();
prevSiblingIndex = -1;
found = nsLineBox::RFindLineContaining(aPrevSibling, lineList->begin(),
found = nsLineBox::RFindLineContaining(aPrevSibling,
overflowLines->mLines.begin(),
prevSibLine,
overflowLines->mFrames.LastChild(),
&prevSiblingIndex);
@ -5097,7 +5098,7 @@ nsBlockFrame::AddFrames(nsFrameList& aFrameList, nsIFrame* aPrevSibling)
} else {
// Note: defensive code! RFindLineContaining must not return
// false in this case, so if it does...
NS_NOTREACHED("prev sibling not in line list");
MOZ_ASSERT_UNREACHABLE("prev sibling not in line list");
aPrevSibling = nullptr;
prevSibLine = lineList->end();
}