NS_ENSURE_TRUE(nsResProtocolHandler::get(), NS_ERROR_NOT_AVAILABLE);
NS_ENSURE_TRUE(gResHandler, NS_ERROR_NOT_AVAILABLE);
nsResURL::GetFile(nsIFile **result){    nsresult rv;    NS_ENSURE_TRUE(nsResProtocolHandler::get(), NS_ERROR_NOT_AVAILABLE);    nsXPIDLCString spec;    rv = nsResProtocolHandler::get()->ResolveURI(this, getter_Copies(spec));    if (NS_FAILED(rv)) return rv;    nsCOMPtr<nsILocalFile> localFile =            do_CreateInstance(NS_LOCAL_FILE_CONTRACTID, &rv);    if (NS_FAILED(rv)) return rv;    rv = localFile->SetURL(spec);    if (NS_FAILED(rv)) return rv;    return CallQueryInterface(localFile, result);}