зеркало из https://github.com/mozilla/gecko-dev.git
r=dp; cleanup xpcom library too during shutdown to reduce global leaks
This commit is contained in:
Родитель
a3d7e7cf09
Коммит
b18e3d2122
|
@ -47,6 +47,7 @@
|
|||
#include "nsProxyEventPrivate.h" // access to the impl of nsProxyObjectManager for the generic factory registration.
|
||||
|
||||
#include "nsFileSpecImpl.h"
|
||||
#include "xptinfo.h"
|
||||
|
||||
#include "nsThread.h"
|
||||
|
||||
|
@ -468,6 +469,9 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr)
|
|||
{
|
||||
nsrefcnt cnt;
|
||||
|
||||
// Release our own singletons...
|
||||
XPTI_FreeInterfaceInfoManager();
|
||||
|
||||
// We may have AddRef'd for the caller of NS_InitXPCOM, so release it
|
||||
// here again:
|
||||
|
||||
|
@ -484,6 +488,13 @@ nsresult NS_COM NS_ShutdownXPCOM(nsIServiceManager* servMgr)
|
|||
_FreeAutoLockStatics();
|
||||
#endif
|
||||
|
||||
NS_PurgeAtomTable();
|
||||
|
||||
#ifdef DEBUG_kipp
|
||||
nsTraceRefcnt::DumpLeaks(stderr);
|
||||
nsTraceRefcnt::FlushCtorRegistry();
|
||||
#endif
|
||||
|
||||
#ifdef GC_LEAK_DETECTOR
|
||||
// Shutdown the GC.
|
||||
NSShutdownGarbageCollector();
|
||||
|
|
Загрузка…
Ссылка в новой задаче