Download status listener keeps windows alive until app shutdown

RESOLVED FIXED in mozilla1.9beta4

Status

()

Toolkit
Downloads API
P1
normal
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: Ben Turner (not reading bugmail, use the needinfo flag!), Assigned: Ben Turner (not reading bugmail, use the needinfo flag!))

Tracking

Trunk
mozilla1.9beta4
Points:
---
Bug Flags:
blocking1.9 +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

Created attachment 302630 [details] [diff] [review]
Patch, v1

Working on making the cycle collector free closed DOM windows I found that the download status panel listener is never removed when the browser closes. This keeps all DOM windows open until the app shuts down and the download manager clears its listener list.

We need to figure out a generic way to prevent this sort of thing, but that's for another bug.
Flags: blocking-firefox3?
Attachment #302630 - Flags: review?(mano)
Wouldn't it be better to just unregister the listener on window unload?
Blocks: 402278
onunload="BrowserShutdown()", so I think this is doing what you're talking about?
right, sorry.  Missed that.
Comment on attachment 302630 [details] [diff] [review]
Patch, v1

I would rather add an unit method to the listener object, instead of exposing isListening.
Attachment #302630 - Flags: review?(mano) → review-
Created attachment 303159 [details] [diff] [review]
Patch, v2

Ok, with uninit.
Attachment #302630 - Attachment is obsolete: true
Attachment #303159 - Flags: review?(mano)
Comment on attachment 303159 [details] [diff] [review]
Patch, v2

nit: remove the braces in uninit.

r=mano otherwise.
Attachment #303159 - Flags: review?(mano) → review+
Flags: blocking-firefox3? → blocking-firefox3+
Priority: -- → P1
Fixed, thanks!
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED

Comment 8

9 years ago
*** VERIFIED
I even 100% remember this bug, it's fixed now.

Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b5pre) Gecko/2008030607 Minefield/3.0b5pre

-Mike
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.