Bug 632835 - Firefox doesn't pass iframe test from bug 363109 correctly, r=smaug+bz, a=hardblocker

This commit is contained in:
michal.novotny@gmail.com 2011-02-23 15:47:09 +02:00
parent 75e756680e
commit eb6bbce30d

View File

@ -645,13 +645,7 @@ nsSHEntry::AddChild(nsISHEntry * aChild, PRInt32 aOffset)
}
#endif
// 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)) {
if (!mChildren.ReplaceObjectAt(aChild, aOffset)) {
NS_WARNING("Adding a child failed!");
aChild->SetParent(nsnull);
return NS_ERROR_FAILURE;