mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 589441 - Settings "clear browsing history when Minefield closes" causes crashed sessions to not be restored [r=dietrich, a=blocking2.0:betaN+]
--HG-- extra : rebase_source : 6d86b581c678ccd2bf065aff6956b0ee4b56a7bb
This commit is contained in:
parent
ae57b92b11
commit
1ac5196eea
@ -167,7 +167,7 @@ SessionStartup.prototype = {
|
||||
win.tabs.every(function (tab) tab.pinned)))
|
||||
Services.obs.addObserver(this, "domwindowopened", true);
|
||||
|
||||
Services.obs.addObserver(this, "browser:purge-session-history", true);
|
||||
Services.obs.addObserver(this, "sessionstore-windows-restored", true);
|
||||
}
|
||||
},
|
||||
|
||||
@ -198,6 +198,14 @@ SessionStartup.prototype = {
|
||||
window.removeEventListener("load", arguments.callee, false);
|
||||
}, false);
|
||||
break;
|
||||
case "sessionstore-windows-restored":
|
||||
Services.obs.removeObserver(this, "sessionstore-windows-restored");
|
||||
// We only want to start listening for the purge notification after we've
|
||||
// sessionstore has finished its initial startup. That way we won't observe
|
||||
// the purge notification & clear the old session before sessionstore loads
|
||||
// it (in the case of a crash).
|
||||
Services.obs.addObserver(this, "browser:purge-session-history", true);
|
||||
break;
|
||||
case "browser:purge-session-history":
|
||||
// reset all state on sanitization
|
||||
this._iniString = null;
|
||||
|
Loading…
Reference in New Issue
Block a user