Bug 837208 - Closing a private browsing window yields NS_ERROR_FAILURE in removeObserver() at LightweightThemeConsumer.jsm:64; r=ehsan

This commit is contained in:
Tim Taubert 2013-02-01 14:31:32 -05:00
Родитель 9300fc26a8
Коммит 91eb787157
1 изменённых файлов: 7 добавлений и 4 удалений

Просмотреть файл

@ -59,11 +59,14 @@ LightweightThemeConsumer.prototype = {
},
destroy: function () {
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
.removeObserver(this, "lightweight-theme-styling-update");
if (!PrivateBrowsingUtils.isWindowPrivate(this._win)) {
Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService)
.removeObserver(this, "lightweight-theme-styling-update");
this._win.removeEventListener("resize", this);
}
this._win.removeEventListener("resize", this);
this._win = this._doc = null;
},