зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1659668 - Make sure the children array is big enough when adding a child using ReplaceElementAt in SessionHistoryEntry::AddChild. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D87415
This commit is contained in:
Родитель
4024f7b515
Коммит
4c8b6bf03f
|
@ -805,6 +805,8 @@ void SessionHistoryEntry::AddChild(SessionHistoryEntry* aChild, int32_t aOffset,
|
|||
"Adding a child where we already have a child? This may misbehave");
|
||||
oldChild->SetParent(nullptr);
|
||||
}
|
||||
} else {
|
||||
mChildren.SetLength(aOffset + 1);
|
||||
}
|
||||
|
||||
mChildren.ReplaceElementAt(aOffset, aChild);
|
||||
|
|
Загрузка…
Ссылка в новой задаче