mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 738654 - Part a: doRemoveChildAt can't fail; r=sicking
This commit is contained in:
parent
7482ecf3b8
commit
9df73a304c
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user