nsHTMLFormElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn) { *aReturn = nsnull;  nsHTMLFormElement* it = new nsHTMLFormElement(mNodeInfo); if (!it) { return NS_ERROR_OUT_OF_MEMORY; }  nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);  nsresult rv = it->Init(); NS_ENSURE_SUCCESS(rv, rv);  CopyInnerTo(it, aDeep);  kungFuDeathGrip.swap(*aReturn);  return NS_OK; }
NS_IMPL_DOM_CLONENODE_WITH_INIT(nsHTMLFormElement)
nsHTMLFormElement::CloneNode(PRBool aDeep, nsIDOMNode** aReturn){  *aReturn = nsnull;  nsHTMLFormElement* it = new nsHTMLFormElement(mNodeInfo);  if (!it) {    return NS_ERROR_OUT_OF_MEMORY;  }  nsCOMPtr<nsIDOMNode> kungFuDeathGrip(it);  nsresult rv = it->Init();  NS_ENSURE_SUCCESS(rv, rv);  CopyInnerTo(it, aDeep);  kungFuDeathGrip.swap(*aReturn);  return NS_OK;}