Closed Bug 1529287 Opened 5 years ago Closed 5 years ago

Port more of bug 1526382 to Thunderbird chat

Categories

(Thunderbird :: Instant Messaging, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 67.0

People

(Reporter: clokep, Assigned: clokep)

References

Details

Attachments

(1 file, 2 obsolete files)

Bug 1528907 started this by updating the implementation of ClassInfo, but that isn't used everywhere in chat, so those need to be updated manually.

See https://searchfox.org/comm-central/source/chat/components/src/imContacts.js

I think we can grep for getInterfaces here, changes should be easy, similar to: https://hg.mozilla.org/comm-central/rev/433ea630bdb8.

Attached patch Uses ClassInfo in imContacts.js (obsolete) — Splinter Review

Using grep it doesn't seem that we have anymore references to getInterfaces.

I'm not 100% sure I properly used ClassInfo, but this made some errors going away.

Assignee: nobody → clokep
Status: NEW → ASSIGNED
Attachment #9045256 - Flags: review?(florian)
Comment on attachment 9045256 [details] [diff] [review]
Uses ClassInfo in imContacts.js

Review of attachment 9045256 [details] [diff] [review]:
-----------------------------------------------------------------

The ClassInfo helper automatically adds the nsIClassInfo and nsISupports interfaces.

When there's a single interface, you don't have to put it in an array.

Would you like to add a description for all cases, or are we happy with the default "JS Proto Object" description?
Attachment #9045256 - Flags: review?(florian) → review-

Handles review comments. I was not 100% sure about leaving classID and contractID on each of these, but since there's no other way to provide those I assume we need to leave them on each class?

Attachment #9045256 - Attachment is obsolete: true
Attachment #9046680 - Flags: review?(florian)
Comment on attachment 9046680 [details] [diff] [review]
Uses ClassInfo in imContacts.js v2

Review of attachment 9046680 [details] [diff] [review]:
-----------------------------------------------------------------

(In reply to Patrick Cloke [:clokep] from comment #3)

> Created attachment 9046680 [details] [diff] [review]
> Uses ClassInfo in imContacts.js v2
> 
> Handles review comments. I was not 100% sure about leaving `classID` and `contractID` on each of these, but since there's no other way to provide those I assume we need to leave them on each class?

Uh, I didn't pay enough attention during the previous review, sorry. The cases where you have a classID and contractID are services that we access through getService where we already explicitly specify the interface we request, so I don't think implementing nsIClassInfo on these is useful.

Let's revert the changes for the ContactsService and TagsService, sorry :-/.
Attachment #9046680 - Flags: review?(florian) → review-
Attached patch Patch v3Splinter Review

This reverts the changes to the TagsService and ContactsService.

Attachment #9046680 - Attachment is obsolete: true
Attachment #9046725 - Flags: review?(florian)
Comment on attachment 9046725 [details] [diff] [review]
Patch v3

Review of attachment 9046725 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good to me. I wonder how come ClassInfo was already imported but unused in this file, and didn't cause eslint to complain.
Attachment #9046725 - Flags: review?(florian) → review+

Pushed by clokep@gmail.com:
https://hg.mozilla.org/comm-central/rev/cc990b014a70
Port more of bug 1526382 to Thunderbird chat. r=florian

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

Attachment

General

Created:
Updated:
Size: