Bug 1067505 - Make nsCategoryManager into a strong memory reporter. r=njn
authorAndrew McCreight <continuation@gmail.com>
Fri, 19 Sep 2014 09:35:23 -0700
changeset 206270 f9bfd3909264f1b5e57dcae9eeb16f957b075f9c
parent 206269 a53aa43ab5f4957321a5805f0ea171098847891f
child 206271 6dc8272079e625ad360c2aa9bc30823fecdbbde8
push id27520
push userkwierso@gmail.com
push dateSat, 20 Sep 2014 00:25:19 +0000
treeherdermozilla-central@27253887d2cc [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1067505
milestone35.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 1067505 - Make nsCategoryManager into a strong memory reporter. r=njn The nsCategoryManager singleton lives until very late in shutdown, so the unregister always fails. It is okay to make it a strong reporter because it will always outlive the memory reporter manager anyways.
xpcom/components/nsCategoryManager.cpp
--- a/xpcom/components/nsCategoryManager.cpp
+++ b/xpcom/components/nsCategoryManager.cpp
@@ -464,23 +464,21 @@ nsCategoryManager::nsCategoryManager()
 {
   PL_INIT_ARENA_POOL(&mArena, "CategoryManagerArena",
                      NS_CATEGORYMANAGER_ARENA_SIZE);
 }
 
 void
 nsCategoryManager::InitMemoryReporter()
 {
-  RegisterWeakMemoryReporter(this);
+  RegisterStrongMemoryReporter(this);
 }
 
 nsCategoryManager::~nsCategoryManager()
 {
-  UnregisterWeakMemoryReporter(this);
-
   // the hashtable contains entries that must be deleted before the arena is
   // destroyed, or else you will have PRLocks undestroyed and other Really
   // Bad Stuff (TM)
   mTable.Clear();
 
   PL_FinishArenaPool(&mArena);
 }