Bug 738654 - Part a: doRemoveChildAt can't fail; r=sicking

This commit is contained in:
Ms2ger 2012-03-29 23:09:06 +02:00
parent 7482ecf3b8
commit 9df73a304c
3 changed files with 6 additions and 9 deletions

View File

@ -1513,8 +1513,8 @@ protected:
* @param aChildArray The child array to work with.
* @param aMutationEvent whether to fire a mutation event for this removal.
*/
nsresult doRemoveChildAt(PRUint32 aIndex, bool aNotify, nsIContent* aKid,
nsAttrAndChildArray& aChildArray);
void doRemoveChildAt(PRUint32 aIndex, bool aNotify, nsIContent* aKid,
nsAttrAndChildArray& aChildArray);
/**
* Most of the implementation of the nsINode InsertChildAt method.

View File

@ -3530,10 +3530,9 @@ nsDocument::RemoveChildAt(PRUint32 aIndex, bool aNotify)
DestroyElementMaps();
}
nsresult rv =
doRemoveChildAt(aIndex, aNotify, oldKid, mChildren);
doRemoveChildAt(aIndex, aNotify, oldKid, mChildren);
mCachedRootElement = nsnull;
return rv;
return NS_OK;
}
PRInt32

View File

@ -3855,13 +3855,13 @@ nsGenericElement::RemoveChildAt(PRUint32 aIndex, bool aNotify)
NS_ASSERTION(oldKid == GetChildAt(aIndex), "Unexpected child in RemoveChildAt");
if (oldKid) {
return doRemoveChildAt(aIndex, aNotify, oldKid, mAttrsAndChildren);
doRemoveChildAt(aIndex, aNotify, oldKid, mAttrsAndChildren);
}
return NS_OK;
}
nsresult
void
nsINode::doRemoveChildAt(PRUint32 aIndex, bool aNotify,
nsIContent* aKid, nsAttrAndChildArray& aChildArray)
{
@ -3888,8 +3888,6 @@ nsINode::doRemoveChildAt(PRUint32 aIndex, bool aNotify,
}
aKid->UnbindFromTree();
return NS_OK;
}
NS_IMETHODIMP