if (async) ret = bundle->Init(aURLSpec); else ret = bundle->InitSyncStream(aURLSpec);   if (NS_FAILED(ret)) { NS_RELEASE(bundle); return NS_ERROR_FAILURE; }
nsStringBundleService::getStringBundle(const char *aURLSpec,                                       PRBool async,                                       nsIStringBundle **aResult){  nsresult ret;  nsCStringKey completeKey(aURLSpec);  bundleCacheEntry_t* cacheEntry =    (bundleCacheEntry_t*)mBundleMap.Get(&completeKey);    if (cacheEntry) {    // cache hit!    // remove it from the list, it will later be reinserted    // at the head of the list    PR_REMOVE_LINK((PRCList*)cacheEntry);      } else {    // hasn't been cached, so insert it into the hash table    nsStringBundle* bundle = new nsStringBundle();    if (!bundle) return NS_ERROR_OUT_OF_MEMORY;    NS_ADDREF(bundle);        if (async)      ret = bundle->Init(aURLSpec);    else      ret = bundle->InitSyncStream(aURLSpec);    if (NS_FAILED(ret)) {      NS_RELEASE(bundle);      return NS_ERROR_FAILURE;    }    cacheEntry = insertIntoCache(bundle, &completeKey);    NS_RELEASE(bundle);         // cache should now be holding a ref                                // in the cacheEntry  }  // at this point the cacheEntry should exist in the hashtable,  // but is not in the LRU cache.  // put the cache entry at the front of the list    PR_INSERT_LINK((PRCList *)cacheEntry, &mBundleCache);  // finally, return the value  *aResult = cacheEntry->mBundle;  NS_ADDREF(*aResult);  return NS_OK;}