Bug 1376825 - Set eIsNotInDocument to accessible's state when unbinding from doc. r=surkov, a=jcristau
authorEitan Isaacson <eitan@monotonous.org>
Thu, 20 Jul 2017 12:57:00 -0400
changeset 356269 eeeec9cafc4ed60652c26f5a3df905ae6bce5946
parent 356268 68a444daf85b7b5a11bca63424d878b8e6a84fb2
child 356270 d68fa12fbffc0cee419f920fac12a7c8cb6b2be7
push id7279
push userryanvm@gmail.com
push dateMon, 28 Aug 2017 15:55:23 +0000
treeherdermozilla-esr52@5d95b2833b30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssurkov, jcristau
bugs1376825
milestone52.3.1
Bug 1376825 - Set eIsNotInDocument to accessible's state when unbinding from doc. r=surkov, a=jcristau
accessible/generic/DocAccessible.cpp
--- a/accessible/generic/DocAccessible.cpp
+++ b/accessible/generic/DocAccessible.cpp
@@ -1325,16 +1325,18 @@ DocAccessible::UnbindFromDocument(Access
 #endif
   }
 
   // Remove an accessible from node-to-accessible map if it exists there.
   if (aAccessible->IsNodeMapEntry() &&
       mNodeToAccessibleMap.Get(aAccessible->GetNode()) == aAccessible)
     mNodeToAccessibleMap.Remove(aAccessible->GetNode());
 
+  aAccessible->mStateFlags |= eIsNotInDocument;
+
   // Update XPCOM part.
   xpcAccessibleDocument* xpcDoc = GetAccService()->GetCachedXPCDocument(this);
   if (xpcDoc)
     xpcDoc->NotifyOfShutdown(aAccessible);
 
   void* uniqueID = aAccessible->UniqueID();
 
   NS_ASSERTION(!aAccessible->IsDefunct(), "Shutdown the shutdown accessible!");