Open
Bug 1973899
Opened 9 months ago
Updated 9 months ago
Search settings use name instead of id to check if app provided search engine is inactive
Categories
(Firefox :: Search, defect, P2)
Tracking
()
People
(Reporter: mbeier, Unassigned)
References
Details
(Whiteboard: [sng])
In this line, search settings persists old entries for app provided engines if no app provided engine with the entry's name is currently available. If we rename an app provided engine, search settings will create a new entry with the new name but also keep the old entry with the old name but same id.
The following test case
const CONFIG = [{ identifier: "default" }];
add_setup(async function () {
SearchTestUtils.updateRemoteSettingsConfig(CONFIG);
await Services.search.init();
});
add_task(async function () {
CONFIG[0].base = { name: "default2" };
await SearchTestUtils.updateRemoteSettingsConfig(CONFIG);
let settings = await Services.search.wrappedJSObject._settings.get();
console.log(settings.engines);
});
produces the following output
[{id:"default", _name:"default2", _isAppProvided:true, _metaData:{}}, {id:"default", _name:"default", _isAppProvided:true, _metaData:{}}]
This doesn't cause the search service to crash immediately, but I think it might still lead to issues.
Updated•9 months ago
|
Severity: -- → S4
Priority: -- → P2
Whiteboard: [sng]
Updated•9 months ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•