Bug 997963, part 3 - Make bundleCacheEntry_t::mHashKey into an nsAutoPtr. r=ehsan

This commit is contained in:
Andrew McCreight 2014-04-21 09:41:57 -07:00
parent bf39f777a9
commit f3f5eeefe7

View File

@ -488,7 +488,7 @@ nsresult nsExtensibleStringBundle::GetSimpleEnumeration(nsISimpleEnumerator ** a
#define MAX_CACHED_BUNDLES 16
struct bundleCacheEntry_t : public LinkedListElement<bundleCacheEntry_t> {
nsCStringKey *mHashKey;
nsAutoPtr<nsCStringKey> mHashKey;
// do not use a nsCOMPtr - this is a struct not a class!
nsIStringBundle* mBundle;
};
@ -658,7 +658,6 @@ nsStringBundleService::insertIntoCache(nsIStringBundle* aBundle,
void
nsStringBundleService::recycleEntry(bundleCacheEntry_t *aEntry)
{
delete aEntry->mHashKey;
NS_RELEASE(aEntry->mBundle);
}