Change object definitions in SearchEngine.jsm to be classes
Categories
(Firefox :: Search, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox80 | --- | fixed |
People
(Reporter: standard8, Assigned: standard8)
References
Details
Attachments
(3 files)
In bug 1637744, I want to split SearchEngine into several objects which all extend from a central SearchEngine class. This will help with finding relevant functionality as well as making the core SearchEngine class less complex.
This first step is to change the existing objects into classes. There's a little fallout as preferences tries to iterate the fields of the engine objects to clone them, however with the engine objects as classes, the XPCOM interface fields don't get added, so preferences fails.
The good news is that preferences actually only needs three fields - cloning the rest is a waste of time and memory.
Try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=0fab9a51015e6a571e8925389ca58e452bf86759
Assignee | ||
Comment 1•4 years ago
|
||
The clones appear to be so that access for the tree view in preferences is quick. However, they don't need to clone the entire engine object - they just need three fields.
Additionally, this fixes reloading icons which was attempting to use 'uri' but that isn't defined, and so icons would fail to load if preferences was opened when a search engine is added.
Assignee | ||
Comment 2•4 years ago
|
||
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
It shouldn't cause an issue, but I'll land this set after soft freeze.
Assignee | ||
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2c12d4e78a4a
https://hg.mozilla.org/mozilla-central/rev/d0a32a3b7e6c
https://hg.mozilla.org/mozilla-central/rev/e1d659582192
Description
•