return NS_ERROR_INVALID_POINTER;
return NS_ERROR_NULL_POINTER;
nsJSComponentLoaderModule::GetClassObject(nsIComponentManager *aCompMgr,                               const nsCID& aClass,                               const nsIID& aIID,                               void** r_classObj){    nsresult rv;    // Defensive programming: Initialize *r_classObj in case of error below    if (!r_classObj) {        return NS_ERROR_INVALID_POINTER;    }    *r_classObj = NULL;    // Do one-time-only initialization if necessary    if (!mInitialized) {        rv = Initialize();        if (NS_FAILED(rv)) {            // Initialization failed! yikes!            return rv;        }    }    // Choose the appropriate factory, based on the desired instance    // class type (aClass).    nsCOMPtr<nsIGenericFactory> fact;    if (aClass.Equals(kmozJSComponentLoaderCID)) {        if (!mFactory) {            rv = NS_NewGenericFactory(getter_AddRefs(mFactory),                                      CreateJSComponentLoader);        }        fact = mFactory;    }    else {		rv = NS_ERROR_FACTORY_NOT_REGISTERED;#ifdef DEBUG        char* cs = aClass.ToString();        printf("+++ nsJSComponentLoaderModule: unable to create factory for %s\n", cs);        nsCRT::free(cs);#endif    }    if (fact) {        rv = fact->QueryInterface(aIID, r_classObj);    }    return rv;}