Bug 927398 - Missing call to .uninit() in DOMRequestHelper. r=fabrice

This commit is contained in:
Fernando Jiménez 2013-10-18 12:58:24 +02:00
parent ae712534ef
commit 750c46eb12

View File

@ -154,10 +154,18 @@ DOMRequestIpcHelper.prototype = {
this.innerWindowID = util.currentInnerWindowID;
}
this._destroyed = false;
Services.obs.addObserver(this, "inner-window-destroyed", false);
},
destroyDOMRequestHelper: function() {
if (this._destroyed) {
return;
}
this._destroyed = true;
Services.obs.removeObserver(this, "inner-window-destroyed");
if (this._listeners) {
@ -171,6 +179,11 @@ DOMRequestIpcHelper.prototype = {
this._listeners = null;
this._requests = null;
this._window = null;
// Objects inheriting from DOMRequestIPCHelper may have an uninit function.
if (this.uninit) {
this.uninit();
}
},
observe: function(aSubject, aTopic, aData) {