Closed Bug 1649426 Opened 4 years ago Closed 4 years ago

Separate out OpenSearch initialisation functions to a separate object

Categories

(Firefox :: Search, task, P2)

task
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 80
Iteration:
80.1 - June 29 - July 12
Tracking Status
firefox80 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Regressed 1 open bug)

Details

Attachments

(2 files)

Spitting a couple of patches out from bug 1637744 as that is getting quite big.

The first step here is to define a separate OpenSearchEngine class and move the OpenSearch related initialisation functions across to it. That's actually quite a bit of code, so I think it is worth it being separate.

Note that until we get some more cache rework done, we won't be able to load engines from the cache as OpenSearchEngine objects, we'll still be using the old SearchEngine. However, as this only affects initialisation routes, we should be good for that. Once we get further down the reload engines / init / cache tidy up, we should be able to load these as the 'correct' object.

Also including here a patch which starts to move things out of getEngineParams - namely the loadPath which doesn't actually need to go through getEngineParams.

For now this only handles the initialisation routines. Loading from cache still creates a plain SearchEngine class, and as a result updates handling is still in the main SearchEngine class.

Depends on D80498

Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/91b79a854e78
Create a separate OpenSearchEngine class to handle OpenSearch engines. r=daleharvey.
https://hg.mozilla.org/integration/autoland/rev/fa7ca9bd0ba9
initEngine doesn't need to be in the search engine parameters, and pass the loadPath to the constructor of SearchEngine. r=daleharvey
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 80
Regressions: 1652273
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: