Closed Bug 767155 Opened 12 years ago Closed 12 years ago

JS error when the contact of an ongoing conversation signs off

Categories

(Thunderbird :: Instant Messaging, defect)

defect
Not set
minor

Tracking

(thunderbird15 fixed, thunderbird16 fixed)

RESOLVED FIXED
Thunderbird 17.0
Tracking Status
thunderbird15 --- fixed
thunderbird16 --- fixed

People

(Reporter: florian, Assigned: florian)

Details

Attachments

(1 file)

[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.
Attached patch PatchSplinter 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]
Patch

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]
Patch

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
Status: NEW → RESOLVED
Closed: 12 years ago
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.

Attachment

General

Created:
Updated:
Size: