Open
Bug 837195
Opened 12 years ago
Updated 2 years ago
"Save Link As" should go through BackgroundFileSaver
Categories
(Firefox :: File Handling, defect)
Tracking
()
NEW
People
(Reporter: mmc, Unassigned)
References
(Blocks 1 open bug)
Details
See Paolo's comment https://bugzilla.mozilla.org/show_bug.cgi?id=662819#c33
Reporter | ||
Updated•12 years ago
|
Assignee: nobody → mmc
Blocks: downloadprotection
Updated•12 years ago
|
Component: Networking: File → File Handling
Reporter | ||
Comment 1•12 years ago
|
||
Hi Paolo,
Do you know the code path for this? Also, do you know why this didn't also hit the same blocking IO badness as in bug 789932? Last, do you know if anyone will object to unifying this codepath?
Thanks,
Monica
Reporter | ||
Updated•12 years ago
|
Flags: needinfo?(paolo.mozmail)
Comment 2•12 years ago
|
||
Save Link As flows through http://hg.mozilla.org/mozilla-central/annotate/1eab3e0d7f53/browser/base/content/nsContextMenu.js#l964.
Comment 3•12 years ago
|
||
(In reply to Monica Chew from comment #1)
> Also, do you know why this didn't also hit the same blocking IO badness as in
> bug 789932?
The peculiarity of this code path is that, while we often go through
nsIExternalHelperAppService (and thus BackgroundFileSaver), sometimes we use
nsIWebBrowserPersist instead. This depends on how fast your network is and
how fast the server is in replying, so it's totally non-deterministic!
> Last, do you know if anyone will object to unifying this codepath?
The "Save As" and "Save Link As" code is definitely in need of some refactoring!
That's something we've been thinking about for quite some time. While nothing
stops us from doing a small refactoring when easy and appropriate, I think most
of this is better handled in the wider context of streamlining the download
process, to enable several proposed user experience improvements:
https://wiki.mozilla.org/User:P.A./Download_user_experience_improvements
I'm currently working on a new JavaScript API for downloads, built from
the ground up (you've come across one of its modules that is using
BackgroundFileSaver), whose immediate goal is to gain a performance win,
but will eventually allow us to unify several of the code paths we have.
Some more context, at a very high level, can be found here:
https://wiki.mozilla.org/User:P.A./Download_architecture_improvements
This is why I'd recommend handling this bug and bug 837194 after you have
finished working on the other items in bug 662819 comment 35. There's also
an advantage in getting the application reputation feature into the tree
earlier, experimentally, even if only for the most common cases at first.
Flags: needinfo?(paolo.mozmail)
Reporter | ||
Comment 4•12 years ago
|
||
I am in complete agreement about the incremental progress. For your amusement, I found this ancient wiki: https://developer.mozilla.org/en-US/docs/Overview_of_how_downloads_work
and a snapshot of that page with unbroken images here:
https://dev.mozilla.jp/localmdc/localmdc_5193.html#index-mozilla_005fdownloads_005fpath2_002edia
Updated•9 years ago
|
Product: Core → Firefox
Comment 5•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: mmc.bugzilla → nobody
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•