зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1174666 - Remove unneeded SessionSaver.clearLastSaveTime() r=Yoric
This commit is contained in:
Родитель
3c6d7a1993
Коммит
6901fe4a13
|
@ -91,14 +91,6 @@ this.SessionSaver = Object.freeze({
|
|||
SessionSaverInternal.updateLastSaveTime();
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the last save time to zero. This will cause us to
|
||||
* immediately save the next time runDelayed() is called.
|
||||
*/
|
||||
clearLastSaveTime: function () {
|
||||
SessionSaverInternal.clearLastSaveTime();
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancels all pending session saves.
|
||||
*/
|
||||
|
@ -161,14 +153,6 @@ let SessionSaverInternal = {
|
|||
this._lastSaveTime = Date.now();
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the last save time to zero. This will cause us to
|
||||
* immediately save the next time runDelayed() is called.
|
||||
*/
|
||||
clearLastSaveTime: function () {
|
||||
this._lastSaveTime = 0;
|
||||
},
|
||||
|
||||
/**
|
||||
* Cancels all pending session saves.
|
||||
*/
|
||||
|
|
|
@ -909,10 +909,13 @@ let SessionStoreInternal = {
|
|||
// perform additional initialization when the first window is loading
|
||||
if (RunState.isStopped) {
|
||||
RunState.setRunning();
|
||||
SessionSaver.updateLastSaveTime();
|
||||
|
||||
// restore a crashed session resp. resume the last session if requested
|
||||
if (aInitialState) {
|
||||
// Don't write to disk right after startup. Set the last time we wrote
|
||||
// to disk to NOW() to enforce a full interval before the next write.
|
||||
SessionSaver.updateLastSaveTime();
|
||||
|
||||
if (isPrivateWindow) {
|
||||
// We're starting with a single private window. Save the state we
|
||||
// actually wanted to restore so that we can do it later in case
|
||||
|
@ -937,9 +940,6 @@ let SessionStoreInternal = {
|
|||
else {
|
||||
// Nothing to restore, notify observers things are complete.
|
||||
Services.obs.notifyObservers(null, NOTIFY_WINDOWS_RESTORED, "");
|
||||
|
||||
// The next delayed save request should execute immediately.
|
||||
SessionSaver.clearLastSaveTime();
|
||||
}
|
||||
}
|
||||
// this window was opened by _openWindowWithState
|
||||
|
|
Загрузка…
Ссылка в новой задаче