Closed Bug 364815 Opened 18 years ago Closed 18 years ago

JS Errors closing/opening compose window after opening Contacts Sidebar

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mcow, Assigned: mscott)

References

Details

(Keywords: fixed1.8.1.2)

Attachments

(1 file)

TB 2b1-1223, 3a1-1215 When an open compose window has its Contacts Sidebar opened, then when that window is dismissed for any reason (including sending) an error appears in the Error Console: ========= Error: CloseAbView is not defined Source File: chrome://messenger/content/addressbook/abContactsPanel.js Line: 139 ========= Subsequently, every time this cached window is reopened, this error also appears: ========= Error: SetAbView is not defined Source File: chrome://messenger/content/addressbook/abContactsPanel.js Line: 145 ========= These methods are defined in abCommon.js. I don't understand the overlay system well enough to know whether that module is in scope or, if not, how to make it so.
Hmm, I've found this is worse than originally described. First of all, the errors only appear if the contacts sidebar has been closed. Second, for each instance of closing the contacts sidebar within the window, there is an instance of the error message. Steps to reproduce: 0) Open the error console. 1) Open a new (uncached) compose window. 2) Open the contacts sidebar. (On trunk, this will show an error: bug 364817.) 3) Close the compose window. (On trunk, and on branch if first compose window this session, will need to dismiss Save? prompt: bug 321783.) 4) Reopen (cached) compose window. 5) Close sidebar. Close window. 6) Reopen compose window. 7) Open sidebar, close again; close window. Actual results: 5) error: CloseAbView is not defined 6) error: OpenAbView is not defined 7) error: CloseAbView is not defined [twice] Possible leak?
Severity: minor → normal
Yes, leaking eventlisteners. I'm not sure if this is the best way to fix the problem, but fix it it does.
Attachment #249521 - Flags: superreview?(mscott)
Attachment #249521 - Flags: review?(mscott)
Comment on attachment 249521 [details] [diff] [review] Remove listeners on unload (non-CVS diff vs. 3a1-1215) looks good to me Mike.
Attachment #249521 - Flags: superreview?(mscott)
Attachment #249521 - Flags: superreview+
Attachment #249521 - Flags: review?(mscott)
Attachment #249521 - Flags: review+
Attachment #249521 - Flags: approval-thunderbird2?
David, when you get a free moment, could you get this fix checked in for me? Thanks.
this is for the branch as well, right, Mike? If so, I'll land it in both places. I tried the above steps on the branch with your patch and didn't see anything on the js console.
(In reply to comment #5) > this is for the branch as well, right, Mike? Yes; I added a approval-TB2 flag request to the attachment. Thank you!
fix checked in on trunk and branch, thx, Mike!
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.1
Resolution: --- → FIXED
Comment on attachment 249521 [details] [diff] [review] Remove listeners on unload (non-CVS diff vs. 3a1-1215) this patch is already on the branch, cleaning up the approval request.
Attachment #249521 - Flags: approval-thunderbird2? → approval-thunderbird2+
The listeners were added by bug 321254 and bug 333510.
Blocks: 321254, 333510
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: