Bug 975372 - make Australis' customizeMode's undoReset not error out at the end when the gSavedState is null, r=jaws

This commit is contained in:
Gijs Kruitbosch 2014-02-21 13:16:12 +00:00
parent 38cc1196f9
commit 2fbbbc9f79

View File

@ -2151,11 +2151,15 @@ let CustomizableUIInternal = {
Services.prefs.setCharPref(kPrefCustomizationState, uiCustomizationState);
Services.prefs.setBoolPref(kPrefDrawInTitlebar, drawInTitlebar);
this.loadSavedState();
for (let areaId of Object.keys(gSavedState.placements)) {
let placements = gSavedState.placements[areaId];
gPlacements.set(areaId, placements);
// If the user just customizes toolbar/titlebar visibility, gSavedState will be null
// and we don't need to do anything else here:
if (gSavedState) {
for (let areaId of Object.keys(gSavedState.placements)) {
let placements = gSavedState.placements[areaId];
gPlacements.set(areaId, placements);
}
this._rebuildRegisteredAreas();
}
this._rebuildRegisteredAreas();
},
_clearPreviousUIState: function() {