Bug 1461912 - Do not clear accessible actors cache when document becomes non-busy. r=pbro, a=RyanVM
authorYura Zenevich <yura.zenevich@gmail.com>
Fri, 18 May 2018 13:43:02 -0400
changeset 470878 a375e2abdf85cee0cef056a4cfd108061db575a2
parent 470877 29db38642cdd088356987980748adce41cc40130
child 470879 9e0a6a5bbc1af21ccb6b467e6fbc6e95733d422c
push id9252
push userryanvm@gmail.com
push dateWed, 23 May 2018 16:32:31 +0000
treeherdermozilla-beta@be0e37593e17 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspbro, RyanVM
bugs1461912
milestone61.0
Bug 1461912 - Do not clear accessible actors cache when document becomes non-busy. r=pbro, a=RyanVM MozReview-Commit-ID: 9DwTcF3w4Eo
devtools/server/actors/accessibility.js
--- a/devtools/server/actors/accessibility.js
+++ b/devtools/server/actors/accessibility.js
@@ -601,22 +601,16 @@ const AccessibleWalkerActor = ActorClass
         events.emit(this, "document-ready", rawAccessible);
       }
     }
 
     switch (event.eventType) {
       case EVENT_STATE_CHANGE:
         let { state, isEnabled } = event.QueryInterface(nsIAccessibleStateChangeEvent);
         let isBusy = state & Ci.nsIAccessibleStates.STATE_BUSY;
-        // Accessible document is recreated.
-        if (isBusy && !isEnabled && rawAccessible instanceof Ci.nsIAccessibleDocument) {
-          // Remove its existing cache from tree.
-          this.purgeSubtree(rawAccessible, event.DOMNode);
-        }
-
         if (accessible) {
           // Only propagate state change events for active accessibles.
           if (isBusy && isEnabled) {
             if (rawAccessible instanceof Ci.nsIAccessibleDocument) {
               // Remove its existing cache from tree.
               this.purgeSubtree(rawAccessible, event.DOMNode);
             }
             return;