feat: Dont restore content to unsynced windows, b=no-bug, c=no-component

This commit is contained in:
Mr. M
2026-02-11 23:46:59 +01:00
parent 827b89d4e8
commit aa4aae9e26

View File

@@ -1,5 +1,5 @@
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..2061ef7ac60371a563b4e4cd77ceab586f767a5e 100644
index 2a055f0c5f34f0a2667f659185120c07d38f4e41..f52b8ddecf31e258ca33bbaf3483951d2b804210 100644
--- a/browser/components/sessionstore/SessionStore.sys.mjs
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
@@ -127,6 +127,9 @@ const TAB_EVENTS = [
@@ -63,6 +63,15 @@ index 2a055f0c5f34f0a2667f659185120c07d38f4e41..2061ef7ac60371a563b4e4cd77ceab58
// perform additional initialization when the first window is loading
if (lazy.RunState.isStopped) {
@@ -2088,7 +2097,7 @@ var SessionStoreInternal = {
// to disk to NOW() to enforce a full interval before the next write.
lazy.SessionSaver.updateLastSaveTime();
- if (isPrivateWindow || isTaskbarTab) {
+ if (isPrivateWindow || isTaskbarTab || aWindow.document.documentElement.hasAttribute("zen-unsynced-window")) {
this._log.debug(
"initializeWindow, the window is private or a web app. Saving SessionStartup.state for possibly restoring later"
);
@@ -2131,6 +2140,7 @@ var SessionStoreInternal = {
null,
"sessionstore-one-or-no-tab-restored"