Bug 974481 - Quickly Exiting Customize Mode after Restoring Defaults Makes Customize Sticky/Broken. r=Gijs

This commit is contained in:
Jared Wein 2014-02-26 12:55:00 -05:00
Родитель 299704c518
Коммит 81a430378b
1 изменённых файлов: 9 добавлений и 0 удалений

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

@ -292,6 +292,12 @@ CustomizeMode.prototype = {
return;
}
if (this.resetting) {
LOG("Attempted to exit while we're resetting. " +
"We'll exit after resetting has finished.");
return;
}
this._handler.isExitingCustomizeMode = true;
CustomizableUI.removeListener(this);
@ -885,6 +891,9 @@ CustomizeMode.prototype = {
this._updateEmptyPaletteNotice();
this._showPanelCustomizationPlaceholders();
this.resetting = false;
if (!this._wantToBeInCustomizeMode) {
this.exit();
}
}.bind(this)).then(null, ERROR);
},