From aa4aae9e26a3d132a02a013d133e24127616ce36 Mon Sep 17 00:00:00 2001 From: "Mr. M" Date: Wed, 11 Feb 2026 23:46:59 +0100 Subject: [PATCH] feat: Dont restore content to unsynced windows, b=no-bug, c=no-component --- .../sessionstore/SessionStore-sys-mjs.patch | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/browser/components/sessionstore/SessionStore-sys-mjs.patch b/src/browser/components/sessionstore/SessionStore-sys-mjs.patch index 6284b2dc1..075d984f7 100644 --- a/src/browser/components/sessionstore/SessionStore-sys-mjs.patch +++ b/src/browser/components/sessionstore/SessionStore-sys-mjs.patch @@ -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"