Closed Bug 720356 Opened 12 years ago Closed 5 years ago

Switch to Services.jsm in Thunderbird js files


(Thunderbird :: General, task, P5)


(Not tracked)



(Reporter: standard8, Unassigned)



(Keywords: meta, Whiteboard: [please do not close])

Using Services.jsm will clean up the readability of our code a bit, and should avoid the costs the getService call each time we want a service.
Depends on: 714604
Depends on: 707789
Priority: -- → P5
This will try to cover both /mail and /mailnews in the same way as bug 720358.
Depends on: 721517
Depends on: 722168
Depends on: 722187
Depends on: 726737
Depends on: 732807
Component: General → Backend
Product: Thunderbird → MailNews Core
QA Contact: general → backend
See Also: → 720358
Severity: normal → enhancement
Component: Backend → General
Product: MailNews Core → Thunderbird
QA Contact: backend → general
Depends on: 733496
Depends on: 734544
Depends on: 734547
Depends on: 736870
Depends on: 738810
Depends on: 738991
Depends on: 748965
Depends on: 754579
Depends on: 758911
Depends on: 758915
Depends on: 758951
Depends on: 758979
Depends on: 763106
Depends on: 763437
Depends on: 775394
Depends on: 776705
Depends on: 793599
Depends on: 804004
Depends on: 804008
No longer depends on: 804008
Whiteboard: [please do not close]
I've checked the trunk and the only remaining services to be converted remain in the test files.
Assignee: acelists → archaeopteryx
Can you please provide examples?

/calendar/: should be converted: bug 795102
/chat/: has no such interfaces
/editor/ has no such interfaces (checked two months ago or so)
/ldap/: Didn't touch this because there was discussion about replacing it with a different implementation
/mail/ and /mailnews/: should be converted: bug 852690
/suite/: Leaving the work to the SeaMonkey people
Ok, forget about the list in comment #3, that was for MailServices.
(In reply to :aceman from comment #2)
> I've checked the trunk and the only remaining services to be converted
> remain in the test files.

Hmmm ... Might bug 874690 be related to this?
Probably not, converting the tests may cause more problems like bug 874690, but as I understand it it is not done yet.
Depends on: 863617
No longer blocks: 451578
Blocks: 957184
Blocks: 1508415
No longer blocks: 1508415
Depends on: 1508415
I could convert some remaining occurrences (maybe new Services added?) and some test files (which do not redefine the builtin Services) in bug 1508415.
Aryx, do you see anything more to be done here?
Flags: needinfo?(aryx.bugmail)

Sorry for the late reply. With the uses covered by bug 1508415, imports of the modules which are part of Services outside that file can be detected with - did that eslint check fail before your tests? A similar check could be added for MailServices.jsm.

Flags: needinfo?(aryx.bugmail)
Assignee: aryx.bugmail → nobody

We are gradually adding new subfolders of c-c to be processed by eslint so hopefully any remaining uses (or new ones) will be found.
If you do not see any more uses that you want to fix in this bug (or file a dependent bug now) I'd suggest we close this (and bug 720358) as it is quite old now and the work is basically done.

Closed: 5 years ago
Resolution: --- → FIXED
Type: enhancement → task
You need to log in before you can comment on or make changes to this bug.