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.
This commit is contained in:
Andrew McCreight 2014-09-19 09:35:23 -07:00
Родитель 89f7f62c7c
Коммит 2fe4282ad3
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -469,13 +469,11 @@ nsCategoryManager::nsCategoryManager()
void void
nsCategoryManager::InitMemoryReporter() nsCategoryManager::InitMemoryReporter()
{ {
RegisterWeakMemoryReporter(this); RegisterStrongMemoryReporter(this);
} }
nsCategoryManager::~nsCategoryManager() nsCategoryManager::~nsCategoryManager()
{ {
UnregisterWeakMemoryReporter(this);
// the hashtable contains entries that must be deleted before the arena is // the hashtable contains entries that must be deleted before the arena is
// destroyed, or else you will have PRLocks undestroyed and other Really // destroyed, or else you will have PRLocks undestroyed and other Really
// Bad Stuff (TM) // Bad Stuff (TM)