Closed Bug 1696281 Opened 3 years ago Closed 3 years ago

Split SearchService._getSortedEngines into two for readability

Categories

(Firefox :: Search, task, P3)

task

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: standard8, Assigned: janey, Mentored)

Details

(Whiteboard: [lang=js])

Attachments

(1 file, 7 obsolete files)

As mentioned in https://phabricator.services.mozilla.com/D105031#inline-598754, it would be good for readability of code to split SearchService._getSortedEngines into two, e.g. _getSortedEngines and _getSortedVisibleEngines.

Taking another look at this, this._getSortedEngines(true) calls can simply be replaced by this._sortedEngines. this._getSortedEngines(false) can then be replaced by a getter, e.g. this._sortedVisibleEngines.

The affected function is here: https://searchfox.org/mozilla-central/rev/2c4b830b924f42283632b70f39a60fd36433dd4d/toolkit/components/search/SearchService.jsm#1225-1241

Tests can be run via ./mach xpcshell-test toolkit/components/search

Mentor: standard8
Whiteboard: [lang=js]

Hey its Jane here from Outreachy if its possible would love to work on this one pleeeease!

Assignee: nobody → jenyabrentnall
Status: NEW → ASSIGNED
Attachment #9245454 - Attachment is obsolete: true
Attachment #9245453 - Attachment is obsolete: true
Attachment #9245452 - Attachment is obsolete: true
Attachment #9245632 - Attachment is obsolete: true
Attachment #9245451 - Attachment is obsolete: true
Attachment #9246075 - Attachment is obsolete: true
Attachment #9246074 - Attachment is obsolete: true
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e5cf61ceab6
Split SearchService._getSortedEngines into two for readability. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: