Bug 742376 - DisableDevice is being called with types that are not known device sensors - follow up. Logic got reversed. r=smaug
authorDoug Turner <dougt@dougt.org>
Mon, 04 Jun 2012 09:19:15 -0700
changeset 100582 8a1829c4f00a373db1b462ce078b52e040a9fe27
parent 100581 afa7b85781dc8505ff8819af9e0452bf76ca900f
child 100583 43c1e66ef5509833bcec0bdae3c7c5538e21dcc3
push idunknown
push userunknown
push dateunknown
reviewerssmaug
bugs742376
milestone15.0a1
Bug 742376 - DisableDevice is being called with types that are not known device sensors - follow up. Logic got reversed. r=smaug
content/events/src/nsEventListenerManager.cpp
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -399,17 +399,17 @@ nsEventListenerManager::RemoveEventListe
       if (ls->mListener == aListener &&
           (ls->mFlags & ~NS_PRIV_EVENT_UNTRUSTED_PERMITTED) == aFlags) {
         nsRefPtr<nsEventListenerManager> kungFuDeathGrip = this;
         mListeners.RemoveElementAt(i);
         --count;
         mNoListenerForEvent = NS_EVENT_TYPE_NULL;
         mNoListenerForEventAtom = nsnull;
 
-        if (deviceType) {
+        if (!deviceType) {
           return;
         }
         --typeCount;
       }
     }
   }
 
   if (deviceType && typeCount == 0) {