Bug 1241841 - Remove the RootActor's service worker registration listener on disconnect. r=ejpbruel
authorJan Keromnes <janx@linux.com>
Mon, 15 Feb 2016 08:11:00 +0100
changeset 331227 d7ea24c4e34769da77f25161baf4974b68e0361b
parent 331226 558e99b7aff02dc8dc6b507473c0ecec886c7d1d
child 331228 2ac8a04c4635ab3e2d89d65c71bd2444e5396edd
push id10938
push userBogdan.Postelnicu@softvision.ro
push dateTue, 16 Feb 2016 15:52:05 +0000
reviewersejpbruel
bugs1241841
milestone47.0a1
Bug 1241841 - Remove the RootActor's service worker registration listener on disconnect. r=ejpbruel
devtools/server/actors/root.js
--- a/devtools/server/actors/root.js
+++ b/devtools/server/actors/root.js
@@ -205,16 +205,19 @@ RootActor.prototype = {
       this._parameters.tabList.onListChanged = null;
     }
     if (this._parameters.addonList) {
       this._parameters.addonList.onListChanged = null;
     }
     if (this._parameters.workerList) {
       this._parameters.workerList.onListChanged = null;
     }
+    if (this._parameters.serviceWorkerRegistrationList) {
+      this._parameters.serviceWorkerRegistrationList.onListChanged = null;
+    }
     if (typeof this._parameters.onShutdown === 'function') {
       this._parameters.onShutdown();
     }
     this._extraActors = null;
     this.conn = null;
     this._tabActorPool = null;
     this._globalActorPool = null;
     this._parameters = null;