Closed Bug 382839 Opened 17 years ago Closed 17 years ago

getDownload should return any known download, not just those in progress

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: mossop, Assigned: sdwilsh)

References

()

Details

Attachments

(1 file, 1 obsolete file)

You ought to be able to get info on any download, even after they have completed. Plus I think sdwilsh doesn't have enough work to do.
Status: NEW → ASSIGNED
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 alpha6
I'm going to wait to work on this until Bug 382825 lands since there's a nice helper function that I can use (in that patch) to make this a really trivial fix.
Attached patch v1.0 (obsolete) — Splinter Review
whoops...forgot to attach this yesterday
Attachment #267281 - Flags: review?(gavin.sharp)
Comment on attachment 267281 [details] [diff] [review]
v1.0

It's probably a good thing that I didn't...this won't work anyway.
Attachment #267281 - Attachment is obsolete: true
Attachment #267281 - Flags: review?(gavin.sharp)
Attached patch v1.1Splinter Review
Now with no null dereferencing and a unit test!
Attachment #267288 - Flags: review?(gavin.sharp)
Comment on attachment 267288 [details] [diff] [review]
v1.1

This looks OK, but don't you also need to change the code at http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/toolkit/mozapps/downloads/content/downloadProperties.js&rev=1.5&mark=86#85 , which assumes that getDownload() throws for inactive downloads?
Attachment #267288 - Flags: review?(gavin.sharp) → review-
(In reply to comment #5)
Yes, but I changed that with Bug 381927 since that whole page was completely wrong anyway.  I planned on landing these both at the same time.
Comment on attachment 267288 [details] [diff] [review]
v1.1

Fine, be that way!
Attachment #267288 - Flags: review- → review+
Checking in toolkit/components/downloads/public/nsIDownloadManager.idl;
new revision: 1.12; previous revision: 1.11
Checking in toolkit/components/downloads/src/nsDownloadManager.cpp;
new revision: 1.85; previous revision: 1.84
Checking in toolkit/components/downloads/test/unit/test_download_manager.js;
new revision: 1.13; previous revision: 1.12
Checking in toolkit/components/downloads/test/unit/test_download_manager_migration.js;
new revision: 1.6; previous revision: 1.5
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Flags: blocking-firefox3? → blocking-firefox3+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: