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) {
|
_initWindow: function ssi_initWindow(aWindow) {
|
||||||
if (!aWindow || this._loadState == STATE_RUNNING) {
|
if (aWindow) {
|
||||||
// make sure that all browser windows which try to initialize
|
this.onLoad(aWindow);
|
||||||
// SessionStore are really tracked by it
|
} else if (this._loadState == STATE_STOPPED) {
|
||||||
if (aWindow && (!aWindow.__SSi || !this._windows[aWindow.__SSi]))
|
|
||||||
this.onLoad(aWindow);
|
|
||||||
// If init is being called with a null window, it's possible that we
|
// 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
|
// just want to tell sessionstore that a session is live (as is the case
|
||||||
// with starting Firefox with -private, for example; see bug 568816),
|
// with starting Firefox with -private, for example; see bug 568816),
|
||||||
// so we should mark the load state as running to make sure that
|
// so we should mark the load state as running to make sure that
|
||||||
// things like setBrowserState calls will succeed in restoring the session.
|
// things like setBrowserState calls will succeed in restoring the session.
|
||||||
if (!aWindow && this._loadState == STATE_STOPPED)
|
this._loadState = STATE_RUNNING;
|
||||||
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