nsEventListenerManager-Disconnect-assertion
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 144 217f56ae81ba50267b7f461cf021ba5efd0083e7
permissions -rw-r--r--
State as of now

diff --git a/content/events/src/nsEventListenerManager.cpp b/content/events/src/nsEventListenerManager.cpp
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -351,7 +351,6 @@ nsEventListenerManager::nsEventListenerM
 
 nsEventListenerManager::~nsEventListenerManager() 
 {
-  NS_ASSERTION(!mTarget, "didn't call Disconnect");
   RemoveAllListeners();
 
   --mInstanceCount;
@@ -1218,6 +1217,7 @@ nsEventListenerManager::GetSystemEventGr
       return result;
 
     gSystemEventGroup = group;
+    NS_RootUntilShutdown(gSystemEventGroup);
   }
 
   *aGroup = gSystemEventGroup;
@@ -1234,6 +1234,7 @@ nsEventListenerManager::GetDOM2EventGrou
       return result;
 
     gDOM2EventGroup = group;
+    NS_RootUntilShutdown(gDOM2EventGroup);
   }
 
   *aGroup = gDOM2EventGroup;