Bug 614993 - Assertion in the browser-chrome suite due to gPrivateBrowsingUI.uninit trying to remove its observers even if it hasn't registered them (ASSERTION: Oops! You're asking for a weak reference to an object that doesn't support that.: 'factoryPtr'); r,a=gavin

This commit is contained in:
Ehsan Akhgari 2010-11-26 15:24:38 -05:00
Родитель 80bf7473ca
Коммит 2afb1bc46b
1 изменённых файлов: 6 добавлений и 0 удалений

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

@ -7457,6 +7457,7 @@ let gPrivateBrowsingUI = {
_privateBrowsingService: null,
_searchBarValue: null,
_findBarValue: null,
_inited: false,
init: function PBUI_init() {
Services.obs.addObserver(this, "private-browsing", false);
@ -7467,9 +7468,14 @@ let gPrivateBrowsingUI = {
if (this.privateBrowsingEnabled)
this.onEnterPrivateBrowsing(true);
this._inited = true;
},
uninit: function PBUI_unint() {
if (!this._inited)
return;
Services.obs.removeObserver(this, "private-browsing");
Services.obs.removeObserver(this, "private-browsing-transition-complete");
},