xptimanager-shutdown-reentry
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 66 4161d51d7ccbb4019a5cb4d18a855094024a52db
permissions -rw-r--r--
State as of now

diff --git a/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp b/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
--- a/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
+++ b/xpcom/reflect/xptinfo/src/xptiInterfaceInfoManager.cpp
@@ -158,8 +158,12 @@ xptiInterfaceInfoManager::xptiInterfaceI
 
 xptiInterfaceInfoManager::~xptiInterfaceInfoManager()
 {
-    // We only do this on shutdown of the service.
-    mWorkingSet.InvalidateInterfaceInfos();
+    // If we are being finalized after XPCOM shutdown, InvalidateInterfaceInfos could
+    // try to recreate us through GetInfoMonitor... so don't
+    if (gInterfaceInfoManager) {
+        // We only do this on shutdown of the service.
+        mWorkingSet.InvalidateInterfaceInfos();
+    }
 
     if(mResolveLock)
         PR_DestroyLock(mResolveLock);