mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 08:42:13 +00:00
Bug 829568 - part 3 - restore the initial session in case the user opens a non-private window; r=felipe
This commit is contained in:
parent
316fdd0b85
commit
66f7ab09c7
@ -738,6 +738,18 @@ let SessionStoreInternal = {
|
||||
let followUp = this._statesToRestore[aWindow.__SS_restoreID].windows.length == 1;
|
||||
this.restoreWindow(aWindow, this._statesToRestore[aWindow.__SS_restoreID], true, followUp);
|
||||
}
|
||||
// The user opened another, non-private window after starting up with
|
||||
// a single private one. Let's restore the session we actually wanted to
|
||||
// restore at startup.
|
||||
else if (this._deferredInitialState && !isPrivateWindow &&
|
||||
aWindow.toolbar.visible) {
|
||||
|
||||
this._deferredInitialState._firstTabs = true;
|
||||
this._restoreCount = this._deferredInitialState.windows ?
|
||||
this._deferredInitialState.windows.length : 0;
|
||||
this.restoreWindow(aWindow, this._deferredInitialState, true);
|
||||
this._deferredInitialState = null;
|
||||
}
|
||||
else if (this._restoreLastWindow && aWindow.toolbar.visible &&
|
||||
this._closedWindows.length && !isPrivateWindow) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user