Closed Bug 2084262 Opened 1 month ago Closed 1 month ago

Search one-offs keep a stale engine list when engines change while the one-offs are rebuilding

Categories

(Firefox :: Search, defect)

defect

Tracking

()

RESOLVED FIXED
160 Branch
Tracking Status
firefox160 --- fixed

People

(Reporter: florian, Assigned: florian)

References

Details

Attachments

(1 external file)

SearchOneOffs.invalidateCache() does nothing while _rebuild() is running. If a browser-search-engine-modified notification arrives during a rebuild (an engine is added, removed or has hideOneOffButton toggled while the search panel is opening), the stale _engineInfo stays cached. The next __rebuild() then returns early, and the panel shows the old one-off buttons (or fails to hide them) until something else invalidates the cache.

This makes browser_searchbar_openpopup.js fail every time on Windows 11 25H2 debug ("The one-off buttons container should be hidden"), where it is currently skipped (bug 2019745), and intermittently on Linux.

Fix: when invalidateCache() is called during a rebuild, drop the cache once _rebuild() finishes instead of ignoring the call.

Blocks: 2084272

invalidateCache() was ignored while _rebuild() was running, so an engine change notified during a rebuild left the stale engine list cached, and the next rebuild returned early on it. Defer the invalidation until the rebuild finishes instead.

This also re-enables browser_searchbar_openpopup.js on Windows 11 25H2, skipped in bug 2019745.

Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/fd49e1068c87 https://hg.mozilla.org/integration/autoland/rev/ffdc5df061fa Don't drop SearchOneOffs cache invalidations that arrive during a rebuild, r=search-reviewers,scunnane.
Status: ASSIGNED → RESOLVED
Closed: 1 month ago
Resolution: --- → FIXED
Target Milestone: --- → 160 Branch
QA Whiteboard: [search][qa-triage-done-c161/b160]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: