*aResult = new nsXBLDocumentInfo(str.get(), aDocument);  NS_IF_ADDREF(*aResult);
*aResult = new nsXBLDocumentInfo(aDocument); if (!*aResult) { return NS_ERROR_OUT_OF_MEMORY; }  NS_ADDREF(*aResult);
nsresult NS_NewXBLDocumentInfo(nsIDocument* aDocument, nsIXBLDocumentInfo** aResult){  nsCAutoString str;  aDocument->GetDocumentURL()->GetSpec(str);  *aResult = new nsXBLDocumentInfo(str.get(), aDocument);    NS_IF_ADDREF(*aResult);  return NS_OK;}