mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout Bug 632835 in order to fix Bug 632835, a=backout
This commit is contained in:
parent
278fb10107
commit
5170d49ed9
@ -645,7 +645,13 @@ nsSHEntry::AddChild(nsISHEntry * aChild, PRInt32 aOffset)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!mChildren.ReplaceObjectAt(aChild, aOffset)) {
|
||||
// InsertObjectAt allows only appending one object.
|
||||
// If aOffset is larger than Count(), we must first manually
|
||||
// set the capacity.
|
||||
if (aOffset > mChildren.Count()) {
|
||||
mChildren.SetCount(aOffset);
|
||||
}
|
||||
if (!mChildren.InsertObjectAt(aChild, aOffset)) {
|
||||
NS_WARNING("Adding a child failed!");
|
||||
aChild->SetParent(nsnull);
|
||||
return NS_ERROR_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user