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

JS Downloads API has no access to the underlying request nsIChannel

RESOLVED WONTFIX

Status

()

Toolkit
Downloads API
RESOLVED WONTFIX
4 years ago
28 days ago

People

(Reporter: Matthew Turnbull [Bluefang], Unassigned)

Tracking

(Blocks: 2 bugs)

26 Branch
Points:
8
Dependency tree / graph
Bug Flags:
firefox-backlog +

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

4 years ago
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20130918030202

Steps to reproduce:

PDMTS [1] uses the download's nsIChannel to get the advertised modification time from the server, but this doesn't appear to be exposed through any API in the new Downloads implementation [2].

This is similar to Bug 915036, in that it needs access to the nsIChannel. However, this only needs read-only access to the nsIChannel after the download has started, so I assume this would be a simpler accommodation in the API (i.e. make it accessible through Download.saver.channel).

It's also worth noting that the nsIChannel needs to be held onto until the download is terminated (successful or not) and the related events have finished processing. Otherwise, downloads could lose the nsIChannel before events get triggered (Bug 595785).

[1] https://addons.mozilla.org/en-US/firefox/addon/preserve-download-modification/
[2] https://groups.google.com/d/msg/mozilla.dev.extensions/ltOB3MzVwcI/1Cf2x9mMBuwJ
(Reporter)

Updated

4 years ago
Blocks: 825588
Component: Untriaged → Extension Compatibility
OS: Linux → All
Hardware: x86_64 → All
Component: Extension Compatibility → Download Manager
Product: Firefox → Toolkit
Status: UNCONFIRMED → NEW
Ever confirmed: true

Comment 1

4 years ago
We definitely need a way for add-ons to register hooks into the API, to provide this type of functionality. The DownloadSaver objects could do global DownloadIntegration calls, or we could let add-ons extend existing DownloadSaver types, see bug 899013 and bug 841348.
Depends on: 899013, 841348

Updated

4 years ago
Blocks: 733954
(Reporter)

Updated

4 years ago
Blocks: 907764
Blocks: 950073

Updated

4 years ago
Whiteboard: p=0

Updated

3 years ago
No longer blocks: 950073
Flags: firefox-backlog+
Whiteboard: p=0 → p=8

Updated

3 years ago
Points: --- → 8
Whiteboard: p=8

Comment 2

28 days ago
Closing the old compatibility bug now that legacy extensions are not supported anymore.
Status: NEW → RESOLVED
Last Resolved: 28 days ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.