rv = result->Init(); if (NS_FAILED(rv)) { delete result; return rv; }
NS_NewXULPrototypeCache(nsISupports* aOuter, REFNSIID aIID, void** aResult){    NS_PRECONDITION(! aOuter, "no aggregation");    if (aOuter)        return NS_ERROR_NO_AGGREGATION;    nsXULPrototypeCache* result = new nsXULPrototypeCache();    if (! result)        return NS_ERROR_OUT_OF_MEMORY;    nsresult rv;    rv = result->Init();    if (NS_FAILED(rv)) {        delete result;        return rv;    }    NS_ADDREF(result);    rv = result->QueryInterface(aIID, aResult);    NS_RELEASE(result);    return rv;}