If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

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

RESOLVED FIXED in mozilla1.9alpha6

Status

()

Toolkit
Downloads API
RESOLVED FIXED
11 years ago
9 years ago

People

(Reporter: mossop, Assigned: sdwilsh)

Tracking

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

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

11 years ago
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.
(Assignee)

Updated

11 years ago
Status: NEW → ASSIGNED
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 alpha6
(Assignee)

Comment 1

11 years ago
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.
(Assignee)

Comment 2

10 years ago
Created attachment 267281 [details] [diff] [review]
v1.0

whoops...forgot to attach this yesterday
Attachment #267281 - Flags: review?(gavin.sharp)
(Assignee)

Comment 3

10 years ago
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)
(Assignee)

Comment 4

10 years ago
Created attachment 267288 [details] [diff] [review]
v1.1

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-
(Assignee)

Comment 6

10 years ago
(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+
(Assignee)

Comment 8

10 years ago
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
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Flags: blocking-firefox3? → blocking-firefox3+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.