commit 4d10206eb617f043c6866ea8601f73aa463085a4 parent f2ef57edf69968114ed16ba49b90d40ab0c5e37f Author: Jens Stutte <jstutte@mozilla.com> Date: Tue, 30 Sep 2025 16:28:27 +0000 Bug 1991083 - SelectableProfileService should register "lightweight-theme-styling-update" only if isInitial. r=profiles-reviewers,mossop Differential Revision: https://phabricator.services.mozilla.com/D266347 Diffstat:
| M | browser/components/profiles/SelectableProfileService.sys.mjs | | | 7 | ++++--- |
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/browser/components/profiles/SelectableProfileService.sys.mjs b/browser/components/profiles/SelectableProfileService.sys.mjs @@ -483,9 +483,10 @@ class SelectableProfileServiceClass extends EventEmitter { return; } - try { - Services.obs.removeObserver(this, "lightweight-theme-styling-update"); - } catch (e) {} + Services.obs.removeObserver( + this.themeObserver, + "lightweight-theme-styling-update" + ); lazy.NimbusFeatures.selectableProfiles.offUpdate(this.onNimbusUpdate);