Bug 1499896 - Clean up listeners to an empty array instead of null. r=mconley, a=RyanVM
authorFelipe Gomes <felipc@gmail.com>
Tue, 30 Oct 2018 19:55:03 +0000
changeset 500948 20548d7c4ba4545b3158b58f50e4c96041be2d9a
parent 500947 d709ec7593d0670a1de6df5ec39e6e34b9ef5ca9
child 500949 831cb67404bdcb5ef9b9a4ed68702054803b81a0
push id1864
push userffxbld-merge
push dateMon, 03 Dec 2018 15:51:40 +0000
treeherdermozilla-release@f040763d99ad [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmconley, RyanVM
bugs1499896
milestone64.0
Bug 1499896 - Clean up listeners to an empty array instead of null. r=mconley, a=RyanVM Differential Revision: https://phabricator.services.mozilla.com/D9047
toolkit/modules/ActorManagerChild.jsm
--- a/toolkit/modules/ActorManagerChild.jsm
+++ b/toolkit/modules/ActorManagerChild.jsm
@@ -166,17 +166,17 @@ class SingletonDispatcher extends Dispat
     for (let actor of this.instances.values()) {
       try {
         actor.cleanup();
       } catch (e) {
         Cu.reportError(e);
       }
     }
 
-    this.listeners = null;
+    this.listeners = [];
   }
 
   handleEvent(event) {
     if (event.type == "pageshow") {
       if (this.hidden) {
         this.init();
       }
       this.hidden = false;