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 199040 36879243d685e4f2427ed8d4558ea3ac63bc1348
parent 199039 1a2d8d974ca737603f8344aee07d2fb9634bafc8
child 199041 12e086839514d92e19c886b21ed6fedde29881a8
push id486
push userasasaki@mozilla.com
push dateMon, 14 Jul 2014 18:39:42 +0000
treeherdermozilla-release@d33428174ff1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs997963
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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");