compmgr-shutdown-asserts
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/components/nsComponentManager.cpp b/xpcom/components/nsComponentManager.cpp
--- a/xpcom/components/nsComponentManager.cpp
+++ b/xpcom/components/nsComponentManager.cpp
@@ -305,10 +305,8 @@ factory_ClearEntry(PLDHashTable *aTable,
 factory_ClearEntry(PLDHashTable *aTable, PLDHashEntryHdr *aHdr)
 {
     nsFactoryTableEntry* entry = static_cast<nsFactoryTableEntry*>(aHdr);
-    // nsFactoryEntry is arena allocated. So we don't delete it.
-    // We call the destructor by hand.
-    entry->mFactoryEntry->~nsFactoryEntry();
-    PL_DHashClearEntryStub(aTable, aHdr);
+    memset(entry->mFactoryEntry, 0, sizeof(nsFactoryEntry));
+    NS_GetGC()->Free(entry->mFactoryEntry);
 }
 
 static const PLDHashTableOps factory_DHashTableOps = {