brizental pushed to branch tor-browser-153.4.0esr-16.0-1 at The Tor Project / Applications / Tor Browser Commits: a350b63b by Beatriz Rizental at 2026-10-05T23:07:14+02:00 fixup! BB 41581: Hide NoScript extension's toolbar button by default. The widget is created once per browser window, so the extensions.hideNoScript pref observer was added for every window and never removed. It kept each closed window alive until shutdown. Remove it when the window unloads. - - - - - 1 changed file: - browser/components/extensions/parent/ext-browserAction.js Changes: ===================================== browser/components/extensions/parent/ext-browserAction.js ===================================== @@ -304,12 +304,20 @@ this.browserAction = class extends ExtensionAPIPersistent { const changeNoScriptVisibility = () => { node.hidden = Services.prefs.getBoolPref(HIDE_NO_SCRIPT_PREF, true); }; - // Since we expect the NoScript widget to only be destroyed on exit, - // we do not set up to remove the observer. Services.prefs.addObserver( HIDE_NO_SCRIPT_PREF, changeNoScriptVisibility ); + document.defaultView.addEventListener( + "unload", + () => { + Services.prefs.removeObserver( + HIDE_NO_SCRIPT_PREF, + changeNoScriptVisibility + ); + }, + { once: true } + ); changeNoScriptVisibility(); } View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a350b63b... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/a350b63b... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help
participants (1)
-
brizental (@brizental)