Bug 1406413 - avoid notifying browser windows that we are clearing the session during shutdown, r=mikedeboer.

This commit is contained in:
Florian Quèze 2018-01-25 23:43:32 +01:00
parent ba70229dec
commit 0e41a411e5

View File

@ -1735,8 +1735,8 @@ var SessionStoreInternal = {
}
if (aData != "restart") {
// Throw away the previous session on shutdown
LastSession.clear();
// Throw away the previous session on shutdown without notification
LastSession.clear(true);
}
this._uninit();
@ -5104,10 +5104,11 @@ var LastSession = {
this._state = state;
},
clear() {
clear(silent = false) {
if (this._state) {
this._state = null;
Services.obs.notifyObservers(null, NOTIFY_LAST_SESSION_CLEARED);
if (!silent)
Services.obs.notifyObservers(null, NOTIFY_LAST_SESSION_CLEARED);
}
}
};