зеркало из https://github.com/mozilla/gecko-dev.git
recover more gracefully from a error condition where cells are inserted into the cellmap after the last column bug 351328 r/sr=bzbarsky
This commit is contained in:
Родитель
1a819479e6
Коммит
06d5ebe18c
|
@ -1571,10 +1571,11 @@ void nsCellMap::InsertCells(nsTableCellMap& aMap,
|
|||
nsRect& aDamageArea)
|
||||
{
|
||||
if (aCellFrames.Count() == 0) return;
|
||||
NS_ASSERTION(aColIndexBefore >= -1, "index out of range");
|
||||
PRInt32 numCols = aMap.GetColCount();
|
||||
if (aColIndexBefore >= numCols) {
|
||||
NS_ASSERTION(PR_FALSE, "bad arg in nsCellMap::InsertCellAt");
|
||||
return;
|
||||
NS_ERROR("Inserting instead of appending cells indicates a serious cellmap error");
|
||||
aColIndexBefore = numCols - 1;
|
||||
}
|
||||
|
||||
// get the starting col index of the 1st new cells
|
||||
|
|
Загрузка…
Ссылка в новой задаче