nsIHTMLContent *newFoot=nsnull; rv = NS_NewHTMLTableSectionElement(&newFoot,nsHTMLAtoms::tfoot); if (NS_SUCCEEDED(rv) && (nsnull!=newFoot))
nsCOMPtr<nsIHTMLContent> newFoot; rv = NS_NewHTMLTableSectionElement(getter_AddRefs(newFoot),nsHTMLAtoms::tfoot); if (NS_SUCCEEDED(rv) && newFoot)
nsHTMLTableElement::CreateTFoot(nsIDOMHTMLElement** aValue){  *aValue = nsnull;  nsresult rv = NS_OK;  nsIDOMHTMLTableSectionElement *foot=nsnull;  GetTFoot(&foot);  if (nsnull!=foot)  { // return the existing tfoot    foot->QueryInterface(kIDOMHTMLElementIID, (void **)aValue);  // caller's addref    NS_ASSERTION(nsnull!=*aValue, "foot must be a DOMHTMLElement");    NS_RELEASE(foot);  }  else  { // create a new foot rowgroup    nsIHTMLContent *newFoot=nsnull;    rv = NS_NewHTMLTableSectionElement(&newFoot,nsHTMLAtoms::tfoot);    if (NS_SUCCEEDED(rv) && (nsnull!=newFoot))    {      rv = mInner.AppendChildTo(newFoot, PR_TRUE);      newFoot->QueryInterface(kIDOMHTMLElementIID, (void **)aValue); // caller's addref      NS_RELEASE(newFoot);    }  }  return NS_OK;}