mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 871057 - Simplify session store initialization; r=ttaubert
This commit is contained in:
parent
6663450684
commit
b394092bf1
@ -494,23 +494,16 @@ let SessionStoreInternal = {
|
||||
},
|
||||
|
||||
_initWindow: function ssi_initWindow(aWindow) {
|
||||
if (!aWindow || this._loadState == STATE_RUNNING) {
|
||||
// make sure that all browser windows which try to initialize
|
||||
// SessionStore are really tracked by it
|
||||
if (aWindow && (!aWindow.__SSi || !this._windows[aWindow.__SSi]))
|
||||
if (aWindow) {
|
||||
this.onLoad(aWindow);
|
||||
} else if (this._loadState == STATE_STOPPED) {
|
||||
// If init is being called with a null window, it's possible that we
|
||||
// just want to tell sessionstore that a session is live (as is the case
|
||||
// with starting Firefox with -private, for example; see bug 568816),
|
||||
// so we should mark the load state as running to make sure that
|
||||
// things like setBrowserState calls will succeed in restoring the session.
|
||||
if (!aWindow && this._loadState == STATE_STOPPED)
|
||||
this._loadState = STATE_RUNNING;
|
||||
return;
|
||||
}
|
||||
|
||||
// As this is called at delayedStartup, restoration must be initiated here
|
||||
this.onLoad(aWindow);
|
||||
},
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user