Bug 474369 - get rid of nsVoidArray, uninitialized warning fix; r+sr=sicking

This commit is contained in:
Arpad Borsos 2009-03-21 09:32:16 +01:00
parent 7c682159d0
commit edf34d2d25

View File

@ -373,19 +373,19 @@ nsSVGNumberList::RemoveElementAt(PRInt32 index)
nsresult
nsSVGNumberList::InsertElementAt(nsIDOMSVGNumber* aElement, PRInt32 index)
{
nsresult rv;
WillModify();
NS_ADDREF(aElement);
// The SVG specs state that 'if newItem is already in a list, it
// is removed from its previous list before it is inserted into this
// list':
// aElement->SetListOwner(this);
if (mNumbers.InsertElementAt(index, aElement))
NS_ADD_SVGVALUE_OBSERVER(aElement);
if (!mNumbers.InsertElementAt(index, aElement)) {
return NS_ERROR_OUT_OF_MEMORY;
}
WillModify();
NS_ADDREF(aElement);
NS_ADD_SVGVALUE_OBSERVER(aElement);
DidModify();
return rv;
return NS_OK;
}