if (NS_SUCCEEDED(rv)) { rv = inst->Init(); }
nsDocLoaderImpl::Create(nsISupports *aOuter, const nsIID &aIID, void **aResult){  nsresult rv;  nsDocLoaderImpl* inst;  // Parameter validation...  if (NULL == aResult) {    rv = NS_ERROR_NULL_POINTER;    goto done;  }  // Do not support aggregatable components...  *aResult = NULL;  if (NULL != aOuter) {    rv = NS_ERROR_NO_AGGREGATION;    goto done;  }  if (NULL == gServiceInstance) {    // Create a new instance of the component...    NS_NEWXPCOM(gServiceInstance, nsDocLoaderImpl);    if (NULL == gServiceInstance) {      rv = NS_ERROR_OUT_OF_MEMORY;      goto done;    }  }  // If the QI fails, the component will be destroyed...  //  // Use a local copy so the NS_RELEASE() will not null the global  // pointer...  inst = gServiceInstance;  NS_ADDREF(inst);  rv = inst->QueryInterface(aIID, aResult);  NS_RELEASE(inst);done:  return rv;}