mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-23 02:05:42 +00:00
Bug 887394 - Don't collect state right after startup when restoring the initial session; r=yoric
This commit is contained in:
parent
21ec7a4239
commit
8d4eb3b9f6
@ -251,6 +251,9 @@ let SessionStoreInternal = {
|
||||
// set default load state
|
||||
_loadState: STATE_STOPPED,
|
||||
|
||||
// initial state to restore after startup
|
||||
_initialState: null,
|
||||
|
||||
// During the initial restore and setBrowserState calls tracks the number of
|
||||
// windows yet to be restored
|
||||
_restoreCount: -1,
|
||||
@ -700,7 +703,7 @@ let SessionStoreInternal = {
|
||||
// actually wanted to restore so that we can do it later in case
|
||||
// the user opens another, non-private window.
|
||||
this._deferredInitialState = this._initialState;
|
||||
delete this._initialState;
|
||||
this._initialState = null;
|
||||
|
||||
// Nothing to restore now, notify observers things are complete.
|
||||
Services.obs.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
|
||||
@ -711,11 +714,12 @@ let SessionStoreInternal = {
|
||||
this._restoreCount = this._initialState.windows ? this._initialState.windows.length : 0;
|
||||
this.restoreWindow(aWindow, this._initialState,
|
||||
this._isCmdLineEmpty(aWindow, this._initialState));
|
||||
delete this._initialState;
|
||||
|
||||
// _loadState changed from "stopped" to "running"
|
||||
// force a save operation so that crashes happening during startup are correctly counted
|
||||
this.saveState(true);
|
||||
this._initialState.session.state = STATE_RUNNING_STR;
|
||||
this._saveStateObject(this._initialState);
|
||||
this._initialState = null;
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user