Closed Bug 906042 Opened 11 years ago Closed 9 years ago

Convert Metro Firefox to use async Downloads.jsm API

Categories

(Firefox for Metro Graveyard :: Downloads, defect, P2)

All
Windows 8.1
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: mbrubeck, Unassigned)

References

Details

(Keywords: perf)

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
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.
Blocks: 928349
Whiteboard: [mentor=mbrubeck][lang=js]
No longer blocks: metrov2planning
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
Closed: 9 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.