JS error when the contact of an ongoing conversation signs off

RESOLVED FIXED in Thunderbird 17.0


Instant Messaging
5 years ago
5 years ago


(Reporter: florian, Assigned: florian)


Thunderbird 17.0

Thunderbird Tracking Flags

(thunderbird15 fixed, thunderbird16 fixed)



(1 attachment)

[Exception... "'Removing a contact that isn't here?' when calling method: [nsIObserver::observe]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)"  location: "JS frame :: file:///Users/florian/buildhg/comm-central/obj-tbird/mozilla/dist/DailyDebug.app/Contents/MacOS/components/imContacts.js :: <TOP_LEVEL> :: line 857"  data: no]

When an account signs off, we try to remove all of its contacts from the "online contacts" group to add them in the "offline contacts" group. However, it's possible that the contact wasn't listed in the "online contacts" group if there was an ongoing conversation with that contact.
Created attachment 644899 [details] [diff] [review]

This actually has a visible effect in addition to the error in the console:
when a contact of an ongoing conversation signs-off, the contact is added in the "Offline Contacts" group and then when the contact signs back on, it appears in the "Online Contacts" group; so we have duplicated contacts in the list.
Assignee: nobody → florian
Attachment #644899 - Flags: review?(mconley)
Note: The patch in bug 775105 will bitrot this patch by removing this.onlineContacts from chat-messenger-overlay.js, but it shouldn't be a problem for the review.
Comment on attachment 644899 [details] [diff] [review]

Review of attachment 644899 [details] [diff] [review]:

I don't currently have the capability to test this patch manually, but the code looks good, and I assume you tested it. :)

r=me by inspection.
Attachment #644899 - Flags: review?(mconley) → review+
Attachment #644899 - Flags: approval-comm-beta?
Attachment #644899 - Flags: approval-comm-aurora?
Comment on attachment 644899 [details] [diff] [review]

I don't think we need to take this for beta, but having it will be a little cleaner.
Attachment #644899 - Flags: approval-comm-beta?
Attachment #644899 - Flags: approval-comm-beta+
Attachment #644899 - Flags: approval-comm-aurora?
Attachment #644899 - Flags: approval-comm-aurora+
comm-central: https://hg.mozilla.org/comm-central/rev/e8fc9787b2ee
comm-aurora: https://hg.mozilla.org/releases/comm-aurora/rev/91884e78c559
comm-beta: https://hg.mozilla.org/releases/comm-beta/rev/23ef48c318b0
Last Resolved: 5 years ago
status-thunderbird15: --- → fixed
status-thunderbird16: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 17.0
Backed out of comm-beta since we landed on a SeaMonkey relbranch (oops).

Re-landed on comm-beta as: https://hg.mozilla.org/releases/comm-beta/rev/c72e572ba01e
You need to log in before you can comment on or make changes to this bug.