Closed Bug 1550599 Opened 5 years ago Closed 5 years ago

Remove duplicate code in SearchService and SearchEngine

Categories

(Firefox :: Search, defect, P1)

65 Branch
defect
Points:
2

Tracking

()

RESOLVED FIXED
Firefox 68
Iteration:
68.4 - Apr 29 - May 12
Tracking Status
firefox68 --- fixed

People

(Reporter: mixedpuppy, Assigned: standard8)

References

Details

Attachments

(1 file)

Stuff got left in both.

perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' SearchEngine.jsm SearchService.jsm

loadListener is one big chunk.

Perhaps a SearchCommon.jsm is needed.

Flags: needinfo?(dharvey)

loadListener isn't actually used in SearchService.jsm. Looks like I missed that (and maybe ESLint, I'll have a poke at it).

Things like the logging/helper functions I'm not sure I really care about too much as they're only small.

The constants would be nice to move to have a better way to share these, but unless idl has added anything recently for strings, I don't think we have much option.

Assignee: nobody → standard8
Flags: needinfo?(dharvey)
Points: --- → 2

Try push:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=f8c74f45a5993561a23ec4c8ae85d280b5c95b8a

Also, note I'm intending on filing mentored follow-ups on rolling out more use of SearchUtils.jsm across the tree - there's lots of places where we use the string constants and we should just centralise them to help avoid typos etc.

No longer blocks: 1542240
Depends on: 1542240
Priority: -- → P1
Summary: duplicate code in SearchService and SearchEngine → Remove duplicate code in SearchService and SearchEngine
Pushed by mbanner@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/77a70aed5f55
Move duplicated code out of SearchService/SearchEngine.jsm into SearchUtils.jsm. r=daleharvey
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
Blocks: 1551179
Iteration: --- → 68.4 - Apr 29 - May 12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: