summaryrefslogtreecommitdiffstats
path: root/browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:33 +0000
commit086c044dc34dfc0f74fbe41f4ecb402b2cd34884 (patch)
treea4f824bd33cb075dd5aa3eb5a0a94af221bbe83a /browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs
parentAdding debian version 124.0.1-1. (diff)
downloadfirefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.tar.xz
firefox-086c044dc34dfc0f74fbe41f4ecb402b2cd34884.zip
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs')
-rw-r--r--browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs14
1 files changed, 8 insertions, 6 deletions
diff --git a/browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs b/browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs
index f54afb8e70..63c94ee8f3 100644
--- a/browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs
+++ b/browser/components/urlbar/UrlbarProviderContextualSearch.sys.mjs
@@ -135,12 +135,17 @@ class ProviderContextualSearch extends UrlbarProvider {
engine = (
await lazy.UrlbarSearchUtils.enginesForDomainPrefix(host, {
matchAllDomainLevels: true,
- onlyEnabled: false,
})
)[0];
}
if (engine) {
+ let instance = this.queryInstance;
+ let icon = await engine.getIconURL();
+ if (instance != this.queryInstance) {
+ return;
+ }
+
this.engines.set(hostname, engine);
// Check to see if the engine that was found is the default engine.
// The default engine will often be used to populate the heuristic result,
@@ -156,7 +161,7 @@ class ProviderContextualSearch extends UrlbarProvider {
let result = this.makeResult({
url,
engine: engine.name,
- icon: engine.getIconURL(),
+ icon,
input: queryContext.searchString,
shouldNavigate: true,
});
@@ -215,12 +220,9 @@ class ProviderContextualSearch extends UrlbarProvider {
* See the base UrlbarProvider class for more.
*
* @param {UrlbarResult} result The result whose view will be updated.
- * @param {Map} idsByName
- * A Map from an element's name, as defined by the provider; to its ID in
- * the DOM, as defined by the browser.
* @returns {object} An object describing the view update.
*/
- getViewUpdate(result, idsByName) {
+ getViewUpdate(result) {
return {
icon: {
attributes: {