nsGenericElement::RemoveChild(nsIDOMNode *aOldChild, nsIDOMNode **aReturn) { *aReturn = nsnull;  if (!aOldChild) { return NS_ERROR_NULL_POINTER;
NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn) { return nsGenericElement::doRemoveChild(aOldChild, aReturn);
nsGenericElement::RemoveChild(nsIDOMNode *aOldChild, nsIDOMNode **aReturn){  *aReturn = nsnull;  if (!aOldChild) {    return NS_ERROR_NULL_POINTER;  }  nsresult res;  nsCOMPtr<nsIContent> content(do_QueryInterface(aOldChild, &res));  if (NS_FAILED(res)) {    /*     * If we're asked to remove something that doesn't support nsIContent     * it can not be one of our children, i.e. we return NOT_FOUND_ERR.     */    return NS_ERROR_DOM_NOT_FOUND_ERR;  }  PRInt32 pos = IndexOf(content);  if (pos < 0) {    /*     * aOldChild isn't one of our children.     */    return NS_ERROR_DOM_NOT_FOUND_ERR;  }  res = RemoveChildAt(pos, PR_TRUE);  *aReturn = aOldChild;  NS_ADDREF(aOldChild);  return res;}