nsresult res = aOldChild->QueryInterface(kIContentIID, (void**)&content); NS_ASSERTION(NS_OK == res, "Must be an nsIContent"); if (NS_OK == res) { PRInt32 pos; IndexOf(content, pos); if (pos >= 0) { res = RemoveChildAt(pos, PR_TRUE); *aReturn = aOldChild; NS_ADDREF(aOldChild); } else { res = NS_ERROR_DOM_NOT_FOUND_ERR; } NS_RELEASE(content); } else { res = NS_ERROR_DOM_HIERARCHY_REQUEST_ERR; }  return res; }
  NS_IMETHOD RemoveChild(nsIDOMNode* aOldChild, nsIDOMNode** aReturn)  {    return nsGenericElement::doRemoveChild(aOldChild, aReturn);  }