Bug 946206 - crash in nsDOMEventTargetHelper::EventListenerRemoved, r=mccr8
authorOlli Pettay <Olli.Pettay@helsinki.fi>
Wed, 04 Dec 2013 20:17:53 +0200
changeset 174483 4e3e0b24a123a0fe4d504eb8cf246a0487759b52
parent 174482 8b33af450fc6da8f3af2a0c699fed855228bfef6
child 174484 29681f348052765ea65ca94b202ba58155069f22
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmccr8
bugs946206
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 946206 - crash in nsDOMEventTargetHelper::EventListenerRemoved, r=mccr8
content/events/src/nsEventListenerManager.cpp
--- a/content/events/src/nsEventListenerManager.cpp
+++ b/content/events/src/nsEventListenerManager.cpp
@@ -754,17 +754,17 @@ nsEventListenerManager::RemoveEventHandl
 
   uint32_t eventType = nsContentUtils::GetEventId(aName);
   nsListenerStruct* ls = FindEventHandler(eventType, aName, aTypeString);
 
   if (ls) {
     mListeners.RemoveElementAt(uint32_t(ls - &mListeners.ElementAt(0)));
     mNoListenerForEvent = NS_EVENT_NULL;
     mNoListenerForEventAtom = nullptr;
-    if (mTarget) {
+    if (mTarget && aName) {
       mTarget->EventListenerRemoved(aName);
     }
   }
 }
 
 nsresult
 nsEventListenerManager::CompileEventHandlerInternal(nsListenerStruct *aListenerStruct,
                                                     nsCxPusher& aPusher,