mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 944557 - Don't save sessionstore.js in permanent private browsing mode. r=ttaubert
This commit is contained in:
parent
e33a915795
commit
e5f3b4f65a
@ -23,6 +23,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "SessionStore",
|
||||
"resource:///modules/sessionstore/SessionStore.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "SessionFile",
|
||||
"resource:///modules/sessionstore/SessionFile.jsm");
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "PrivateBrowsingUtils",
|
||||
"resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||
|
||||
// Minimal interval between two save operations (in milliseconds).
|
||||
XPCOMUtils.defineLazyGetter(this, "gInterval", function () {
|
||||
@ -192,6 +194,14 @@ let SessionSaverInternal = {
|
||||
// Cancel any pending timeouts.
|
||||
this.cancel();
|
||||
|
||||
if (PrivateBrowsingUtils.permanentPrivateBrowsing) {
|
||||
// Don't save (or even collect) anything in permanent private
|
||||
// browsing mode
|
||||
|
||||
this.updateLastSaveTime();
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
||||
stopWatchStart("COLLECT_DATA_MS", "COLLECT_DATA_LONGEST_OP_MS");
|
||||
let state = SessionStore.getCurrentState(forceUpdateAllWindows);
|
||||
PrivacyFilter.filterPrivateWindowsAndTabs(state);
|
||||
|
Loading…
Reference in New Issue
Block a user