Bug 997963, part 9 - Make bundleCacheEntry_t FINAL, have COUNT_CTOR. r=ehsan
authorAndrew McCreight <continuation@gmail.com>
Mon, 21 Apr 2014 16:34:07 -0700
changeset 179883 36879243d685e4f2427ed8d4558ea3ac63bc1348
parent 179882 1a2d8d974ca737603f8344aee07d2fb9634bafc8
child 179884 12e086839514d92e19c886b21ed6fedde29881a8
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersehsan
bugs997963
milestone31.0a1
Bug 997963, part 9 - Make bundleCacheEntry_t FINAL, have COUNT_CTOR. r=ehsan
intl/strres/src/nsStringBundle.cpp
--- a/intl/strres/src/nsStringBundle.cpp
+++ b/intl/strres/src/nsStringBundle.cpp
@@ -467,19 +467,29 @@ nsresult nsExtensibleStringBundle::GetSi
   *aResult = nullptr;
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 /////////////////////////////////////////////////////////////////////////////////////////
 
 #define MAX_CACHED_BUNDLES 16
 
-struct bundleCacheEntry_t : public LinkedListElement<bundleCacheEntry_t> {
+struct bundleCacheEntry_t MOZ_FINAL : public LinkedListElement<bundleCacheEntry_t> {
   nsAutoPtr<nsCStringKey> mHashKey;
   nsCOMPtr<nsIStringBundle> mBundle;
+
+  bundleCacheEntry_t()
+  {
+    MOZ_COUNT_CTOR(bundleCacheEntry_t);
+  }
+
+  ~bundleCacheEntry_t()
+  {
+    MOZ_COUNT_DTOR(bundleCacheEntry_t);
+  }
 };
 
 
 nsStringBundleService::nsStringBundleService() :
   mBundleMap(MAX_CACHED_BUNDLES, true)
 {
   mErrorService = do_GetService(kErrorServiceCID);
   NS_ASSERTION(mErrorService, "Couldn't get error service");