Convert Metro Firefox to use async Downloads.jsm API

RESOLVED WONTFIX

Status

defect
P2
normal
RESOLVED WONTFIX
6 years ago
4 years ago

People

(Reporter: mbrubeck, Unassigned)

Tracking

({perf})

Trunk
All
Windows 8.1
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
Desktop Firefox is in the process of switching from nsIDownloadManager to a new asynchronous API implemented in Downloads.jsm:
https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/Downloads.jsm

We should transition Metro Firefox from nsIDownloadManager to Downloads.jsm also, so that we share more code with desktop and benefit from the improved performance of the new code.

This would be a reasonable task for a new(ish) contributor looking for a medium-sized project.  Let me know if you'd like to work on it.  Most of the code involved is in this file:
http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/downloads.js

Related discussion:
https://groups.google.com/d/topic/mozilla.dev.platform/ltOB3MzVwcI/discussion

Related bugs:
https://bugzilla.mozilla.org/showdependencytree.cgi?id=825588

Comment 1

6 years ago
Currently, uses of nsIDownloadManager in Metro can be seen in these files:

  /browser/metro/base/content/ContextCommands.js
  /browser/metro/base/content/Util.js
  /browser/metro/base/content/downloads.js
  /browser/metro/base/content/sanitize.js
  /browser/metro/base/tests/mochitest/browser_downloads.js
  /browser/metro/components/DownloadManagerUI.js
  /browser/metro/components/HelperAppDialog.js

We're about to land this feature in Desktop Nightly, later we will clean up the
code there (now it is complicated because it supports both back-ends). You'll
be able to use that as an example. If you need more features from the API, feel
file to file new bugs blocking bug 825588.
Blocks: 851471
Depends on: 847863
No longer depends on: jsdownloads
Depends on: 895053
I began work on this but paused because a) We have no tests at all for our Downloads UI so regression testing would be entirely manual. and b) The new Downloads API is entirely async, which extends the scope of this work as methods that call Downloads methods must also become async. We do need to do this, but it looks like we can be feature complete for a preview release without it.
(Reporter)

Updated

6 years ago
Blocks: 928349
(Reporter)

Updated

5 years ago
Whiteboard: [mentor=mbrubeck][lang=js]
No longer blocks: metrov2planning

Updated

5 years ago
OS: Windows 8 Metro → Windows 8.1
Summary: [v2] Convert Metro Firefox to use async Downloads.jsm API → Convert Metro Firefox to use async Downloads.jsm API
Whiteboard: [feature]
Whiteboard: [feature] → [feature] p=0
Whiteboard: [feature] p=0 → p=8
Priority: -- → P2
No longer depends on: 895053
No longer blocks: 851471, metrobacklog
Whiteboard: p=8
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.