if (aOwnerDocument && !aOwnerDocument->AddOrphan(instance)) { return NS_ERROR_OUT_OF_MEMORY; }
NS_NewXMLProcessingInstruction(nsIContent** aInstancePtrResult,                               const nsAString& aTarget,                               const nsAString& aData,                               nsIDocument *aOwnerDocument){  if (aTarget.EqualsLiteral("xml-stylesheet")) {    return NS_NewXMLStylesheetProcessingInstruction(aInstancePtrResult, aData,                                                    aOwnerDocument);  }  *aInstancePtrResult = nsnull;  nsCOMPtr<nsIContent> instance;  instance = new nsXMLProcessingInstruction(aTarget, aData,                                            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;}