Closed Bug 918188 Opened 7 years ago Closed 3 years ago
JS Downloads API has no access to the underlying request ns
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  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 . 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).  https://addons.mozilla.org/en-US/firefox/addon/preserve-download-modification/  https://groups.google.com/d/msg/mozilla.dev.extensions/ltOB3MzVwcI/1Cf2x9mMBuwJ
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
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.
No longer blocks: fxdesktopbacklog
Whiteboard: p=0 → p=8
Closing the old compatibility bug now that legacy extensions are not supported anymore.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.