Files
tubestation/browser/components/sessionstore
Yazan Al Macki 4507fb96aa Bug 1925235 - Avoid updating unified search button icon if searchMode has changed. r=daleharvey,sessionstore-reviewers,dao
Currently, multiple calls to #updateSearchIcon can run concurrently. When restarting the browser with a tab , and another tab in which a local search mode is active, the local search mode is incorrectly displayed as the default engine search mode. I believe this is due to the first #updateSearchIcon call (default engine, triggered when new tab is reopened) taking longer than the subsequent #updateSearchIcon call (triggered when the search mode is restored).

This is probably due to [[ https://searchfox.org/mozilla-central/rev/b6718bf263ae780289da471f0ea35797a09e2f05/browser/components/urlbar/SearchModeSwitcher.sys.mjs#329-334 | this ]] code taking a while to execute in comparison to [[ https://searchfox.org/mozilla-central/rev/b6718bf263ae780289da471f0ea35797a09e2f05/browser/components/urlbar/SearchModeSwitcher.sys.mjs#338-342 | this ]] code that runs for local search modes.

Ensuring that an #updateSearchIcon call terminates if search mode switches during its async processing prevents it from interfering with the next call triggered and incorrectly overriding the icon.

Differential Revision: https://phabricator.services.mozilla.com/D233036
2025-01-14 14:34:05 +00:00
..