NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr"); if (nsnull == aInstancePtrResult) { return NS_ERROR_NULL_POINTER;
NS_ENSURE_ARG_POINTER(aInstancePtrResult);  nsCOMPtr<nsINodeInfoManager> nimgr; nsCOMPtr<nsINodeInfo> nodeInfo;  nsresult rv;  if (aOwnerDocument) { rv = aOwnerDocument->GetNodeInfoManager(*getter_AddRefs(nimgr)); } else { rv = nsNodeInfoManager::GetAnonymousManager(*getter_AddRefs(nimgr));
NS_NewDocumentFragment(nsIDOMDocumentFragment** aInstancePtrResult,                       nsIDocument* aOwnerDocument){  NS_PRECONDITION(nsnull != aInstancePtrResult, "null ptr");  if (nsnull == aInstancePtrResult) {    return NS_ERROR_NULL_POINTER;  }  nsDocumentFragment* it = new nsDocumentFragment(aOwnerDocument);  if (nsnull == it) {    return NS_ERROR_OUT_OF_MEMORY;  }  return it->QueryInterface(kIDOMDocumentFragmentIID,                             (void**) aInstancePtrResult);}