nsIDOMHTMLTableCaptionElement *childToDelete; nsresult rv = GetCaption(&childToDelete); if ((NS_SUCCEEDED(rv)) && (nsnull!=childToDelete))
nsCOMPtr<nsIDOMHTMLTableCaptionElement> childToDelete; nsresult rv = GetCaption(getter_AddRefs(childToDelete)); if ((NS_SUCCEEDED(rv)) && childToDelete)
nsHTMLTableElement::DeleteCaption(){  nsIDOMHTMLTableCaptionElement *childToDelete;  nsresult rv = GetCaption(&childToDelete);  if ((NS_SUCCEEDED(rv)) && (nsnull!=childToDelete))  {    nsIDOMNode* resultingChild;    mInner.RemoveChild(childToDelete, &resultingChild); // mInner does the notification  }  return NS_OK;}