if (aOwnerDocument && !aOwnerDocument->AddOrphan(instance)) { return NS_ERROR_OUT_OF_MEMORY; }
NS_NewTextNode(nsITextContent** aInstancePtrResult,               nsIDocument *aOwnerDocument){  *aInstancePtrResult = nsnull;  nsCOMPtr<nsITextContent> instance = new nsTextNode(aOwnerDocument);  NS_ENSURE_TRUE(instance, NS_ERROR_OUT_OF_MEMORY);  if (aOwnerDocument && !aOwnerDocument->AddOrphan(instance)) {    return NS_ERROR_OUT_OF_MEMORY;  }  instance.swap(*aInstancePtrResult);  return NS_OK;}