Bug 698565 (6/6) - stop excluding keys when calling JSON.stringify() [r=dietrich]

Clear out _lastSessionWindowID and _shouldRestore when possible.
This commit is contained in:
Paul O’Shannessy 2011-11-08 15:23:43 -08:00
parent 78094ba97c
commit 16c85d10ca

View File

@ -377,6 +377,11 @@ SessionStoreService.prototype = {
// We don't want to minimize and then open a window at startup.
if (this._initialState.windows[0].sizemode == "minimized")
this._initialState.windows[0].sizemode = "normal";
// clear any lastSessionWindowID attributes since those don't matter
// during normal restore
this._initialState.windows.forEach(function(aWindow) {
delete aWindow.__lastSessionWindowID;
});
}
}
catch (ex) { debug("The session file is invalid: " + ex); }
@ -3630,6 +3635,7 @@ SessionStoreService.prototype = {
while (oState._closedWindows.length) {
let i = oState._closedWindows.length - 1;
if (oState._closedWindows[i]._shouldRestore) {
delete oState._closedWindows[i]._shouldRestore;
oState.windows.unshift(oState._closedWindows.pop());
}
else {