Closed Bug 953919 Opened 10 years ago Closed 10 years ago

Reconnection timer not stopped when deleting account

Categories

(Instantbird Graveyard :: Account wizard, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: benediktp, Assigned: benediktp)

Details

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 480 at 2010-08-23 21:17:00 UTC ***

When an account with a running reconnection timer is deleted, the timer is not stopped.

One of the results is an error message each second on the console:
"Error: document.getAnonymousElementByAttribute(self, "anonid", "reconnect") is null
Source File: chrome://instantbird/content/account.xml
Line: 170"
Attached patch Patch v1 (obsolete) — Splinter Review
*** Original post on bio 480 as attmnt 337 at 2010-08-24 20:06:00 UTC ***

The fix seemed a bit too easy. I hope I didn't miss anything here ;)
Attachment #8352078 - Flags: review?(florian)
Assignee: nobody → benediktp
Comment on attachment 8352078 [details] [diff] [review]
Patch v1

*** Original change on bio 480 attmnt 337 at 2010-08-24 21:11:49 UTC ***

In the account manager window there's some code to display the accounts, and some code to perform some actions on the account.
In order to maintain the possibility to have several different displays of the accounts visible at the same time, we should not mix them.

The bug you want to fix is related to a timer that refreshes the display, and the code you edited is performing an action on the account. That can't be right. I think you wanted to edit the "observe" method instead (inside the |else if (aTopic == "account-removed")| condition).

The cancelReconnection method you have used actually performs an action (this._account.cancelReconnection). I think you only want to stop the timer if it exists.

Don't hesitate to ask questions if this isn't clear enough (I'm not satisfied of this review comment :-/).
Attachment #8352078 - Flags: review?(florian) → review-
Attached patch Attempt 2Splinter Review
*** Original post on bio 480 as attmnt 347 at 2010-09-01 21:56:00 UTC ***

I added a 'destroy' method to the binding now and am calling it on "account-removed".
Comment on attachment 8352078 [details] [diff] [review]
Patch v1

*** Original change on bio 480 attmnt 337 at 2010-09-01 21:56:30 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352078 - Attachment is obsolete: true
Comment on attachment 8352088 [details] [diff] [review]
Attempt 2

*** Original change on bio 480 attmnt 347 at 2010-09-14 17:47:19 UTC ***

Looks good! Thanks for fixing this.

I've rephrased the comment a bit so it's now:

// If we have a reconnect timer, stop it:
// it will throw errors otherwise (see bug 953919 (bio 480)).
// clearInterval is harmless if the timer doesn't exist.
Attachment #8352088 - Flags: review+
*** Original post on bio 480 at 2010-09-14 18:46:27 UTC ***

https://hg.instantbird.org/instantbird/rev/fc78f734d08d
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → 0.3a1
You need to log in before you can comment on or make changes to this bug.