if (nsnull == anInstance) { rv = NS_ERROR_NULL_POINTER; goto done; }
nsresult rv = NS_OK; nsDocLoaderImpl * newLoader = new nsDocLoaderImpl(); NS_ENSURE_TRUE(newLoader, NS_ERROR_OUT_OF_MEMORY);  NS_ADDREF(newLoader); newLoader->Init();
nsDocLoaderImpl::CreateDocumentLoader(nsIDocumentLoader** anInstance){    nsDocLoaderImpl* newLoader = nsnull;    nsresult rv = NS_OK;    /* Check for initial error conditions... */    if (nsnull == anInstance) {        rv = NS_ERROR_NULL_POINTER;        goto done;    }    NS_NEWXPCOM(newLoader, nsDocLoaderImpl);    if (nsnull == newLoader) {        *anInstance = nsnull;        rv = NS_ERROR_OUT_OF_MEMORY;        goto done;    }    rv = newLoader->Init();    if (NS_FAILED(rv)) return rv;    rv = newLoader->QueryInterface(kIDocumentLoaderIID, (void**)anInstance);    if (NS_SUCCEEDED(rv)) {#ifdef NECKO        AddChildGroup(newLoader->GetLoadGroup());#else        AddChildGroup(newLoader);#endif        newLoader->SetParent(this);    }  done:    return rv;}