Bug 1245615 - Nullify hostVsStores only after event unregistration to prevent exceptions. r=mratcliffe
--- a/devtools/server/actors/storage.js
+++ b/devtools/server/actors/storage.js
@@ -208,23 +208,23 @@ StorageActors.defaults = function(typeNa
}
this.onWindowReady = this.onWindowReady.bind(this);
this.onWindowDestroyed = this.onWindowDestroyed.bind(this);
events.on(this.storageActor, "window-ready", this.onWindowReady);
events.on(this.storageActor, "window-destroyed", this.onWindowDestroyed);
},
destroy: function() {
- this.hostVsStores = null;
if (observationTopic) {
Services.obs.removeObserver(this, observationTopic, false);
}
events.off(this.storageActor, "window-ready", this.onWindowReady);
events.off(this.storageActor, "window-destroyed", this.onWindowDestroyed);
+ this.hostVsStores = null;
this.storageActor = null;
},
getNamesForHost: function(host) {
return [...this.hostVsStores.get(host).keys()];
},
getValuesForHost: function(host, name) {