From e66e763e634044823d64269d558b1e719d90d915 Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Fri, 21 Aug 2026 09:44:49 +0200 Subject: [PATCH] gh-14470: Fixed wrong data image being used for sync (gh-15048) --- src/zen/sync/ZenSpacesSyncApplier.sys.mjs | 5 +++++ src/zen/sync/ZenSpacesSyncModel.sys.mjs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/zen/sync/ZenSpacesSyncApplier.sys.mjs b/src/zen/sync/ZenSpacesSyncApplier.sys.mjs index e2d562f5c..3fab95ac5 100644 --- a/src/zen/sync/ZenSpacesSyncApplier.sys.mjs +++ b/src/zen/sync/ZenSpacesSyncApplier.sys.mjs @@ -598,6 +598,11 @@ class nsZenSpacesSyncApplier { if (icon && syncableIconUrl(tab.getAttribute("image")) !== icon) { try { win.gBrowser.setIcon(tab, icon); + // As on creation: an unloaded tab's cached session image would + // otherwise override the icon set above at every collect. + lazy.TabStateCache.update(tab.linkedBrowser.permanentKey, { + image: null, + }); } catch (e) { console.error("ZenSpacesSync: failed to set tab icon", e); } diff --git a/src/zen/sync/ZenSpacesSyncModel.sys.mjs b/src/zen/sync/ZenSpacesSyncModel.sys.mjs index 0ec8dd760..131484096 100644 --- a/src/zen/sync/ZenSpacesSyncModel.sys.mjs +++ b/src/zen/sync/ZenSpacesSyncModel.sys.mjs @@ -231,7 +231,7 @@ class nsZenSpacesSyncModel { if (!url || url === "about:blank") { return null; } - const icon = syncableIconUrl(initial?.image || tabData.image || ""); + const icon = syncableIconUrl(tabData.image || initial?.image || ""); return { url, title: title || "", icon }; }