Bug 1502061 - Check if origTargetNode still exists in ProcessDOMEvent. r=Jamie
authorEitan Isaacson <eitan@monotonous.org>
Thu, 29 Nov 2018 09:35:00 +0200
changeset 505377 c957f8352e839d5790f7a84774958489a1542102
parent 505376 6baf9f33a6cd6f5a170c1bc6fcd2d67019d598af
child 505378 5e65de3569fe33856451396ab77f78ba9c03a8c8
push id10290
push userffxbld-merge
push dateMon, 03 Dec 2018 16:23:23 +0000
treeherdermozilla-beta@700bed2445e6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersJamie
bugs1502061
milestone65.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 1502061 - Check if origTargetNode still exists in ProcessDOMEvent. r=Jamie
accessible/generic/RootAccessible.cpp
--- a/accessible/generic/RootAccessible.cpp
+++ b/accessible/generic/RootAccessible.cpp
@@ -269,16 +269,21 @@ RootAccessible::ProcessDOMEvent(Event* a
   nsAutoString eventType;
   aDOMEvent->GetType(eventType);
 
 #ifdef A11Y_LOG
   if (logging::IsEnabled(logging::eDOMEvents))
     logging::DOMEvent("processed", origTargetNode, eventType);
 #endif
 
+  if (!origTargetNode) {
+    // Original target has ceased to exist.
+    return;
+  }
+
   if (eventType.EqualsLiteral("popuphiding")) {
     HandlePopupHidingEvent(origTargetNode);
     return;
   }
 
   DocAccessible* targetDocument = GetAccService()->
     GetDocAccessible(origTargetNode->OwnerDoc());
   if (!targetDocument) {