Closed
Bug 390748
Opened 17 years ago
Closed 17 years ago
When downloading multiple files, Download Manager doesn't show files it has queued
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha8
People
(Reporter: ispiked, Assigned: sdwilsh)
References
Details
(Keywords: regression)
Attachments
(1 file, 1 obsolete file)
9.71 KB,
patch
|
asaf
:
review+
|
Details | Diff | Splinter Review |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a7pre) Gecko/2007080204 Minefield/3.0a7pre Steps to reproduce: 1. Browse to an HTTP directory with files in it, say MP3s (there must be at least 3 files). 2. Proceed to right click and Save As all of the files to your Desktop. 3. Open the Download Manager. Actual results: Only two or one of the files is shown in the Download Manager. However, the others do appear after the first ones finish downloading. Expected results: Show all of the files I saved in the Download Manager. < sdwilsh> ok, I totally regressed that in Bug 380250 by enforcing an invarient
Reporter | ||
Comment 1•17 years ago
|
||
This should block the release of Firefox 3 per Mr. Shawn Wilsher.
Flags: blocking-firefox3?
Assignee | ||
Comment 2•17 years ago
|
||
So, the simple fix here is to add another state that comes between DOWNLOAD_NOTSTARTED and DOWNLOAD_DOWNLOADING (maybe DOWNLOAD_QUEUED?). Then, a call to nsDownload::SetState(nsIDownloadManager::DOWNLOAD_QUEUED) would be sufficient to fix this. Any takers?
Flags: in-testsuite-
Flags: in-litmus?
Assignee | ||
Updated•17 years ago
|
Comment 3•17 years ago
|
||
This depends on a server that limits connections; Adam, do you have a well-known one that we can use in Litmus, that won't be going away soon?
Comment 4•17 years ago
|
||
can't you test this by tweaking the netwerk.http.max* prefs?
Comment 5•17 years ago
|
||
(In reply to comment #4) > can't you test this by tweaking the netwerk.http.max* prefs? Indeed I can; thanks for the tip. I really should go through about:config/prefs.js.
Comment 6•17 years ago
|
||
Wasn't this broken and fixed before, too? Definitely blocking.
Flags: blocking-firefox3? → blocking-firefox3+
Assignee | ||
Comment 7•17 years ago
|
||
If someone from qa could test this and verify that this does the trick, it'd be greatly appreciated.
Assignee: nobody → sdwilsh
Status: NEW → ASSIGNED
(In reply to comment #7) > Created an attachment (id=276047) [details] > v1.0 > > If someone from qa could test this and verify that this does the trick, it'd be > greatly appreciated. > Stephen, Adam: I am spinning a release build of this patch + current code for testing.
Ok, build finally done. With Adam's help, we verified that this patch *does not* address the issue. The same problem occurs.
Assignee | ||
Comment 10•17 years ago
|
||
Does anyone have a good test page for this?
Reporter | ||
Comment 11•17 years ago
|
||
This is one of the ones I've used: http://www.square-kun.com/files/songs/The%20Shins/.
Assignee | ||
Comment 12•17 years ago
|
||
Silly me...I had written this patch with the code from the UI rewrite in mind. It *should not* work with what is currently checked in on trunk. Once the new UI lands, I'll updated this.
Assignee | ||
Comment 13•17 years ago
|
||
Updated for the new UI. Tested with provided uri and steps to reproduce and this works for me.
Attachment #276047 -
Attachment is obsolete: true
Attachment #276423 -
Flags: review?(mano)
http://litmus.mozilla.org/show_test.cgi?id=4557 in-litmus+
Flags: in-litmus? → in-litmus+
Comment 15•17 years ago
|
||
Comment on attachment 276423 [details] [diff] [review] v1.1 Please avoid (void) usage on methods which return nsresults.
Attachment #276423 -
Flags: review?(mano)
Assignee | ||
Comment 16•17 years ago
|
||
Comment on attachment 276423 [details] [diff] [review] v1.1 (In reply to comment #15) > (From update of attachment 276423 [details] [diff] [review]) > Please avoid (void) usage on methods which return nsresults. All instances of this are cases where I really don't care about the result. I'll explain why for each one. > rv = AddToCurrentDownloads(dl); >+ (void)dl->SetState(nsIDownloadManager::DOWNLOAD_QUEUED); > NS_ENSURE_SUCCESS(rv, rv); If SetState fails, it just means that updating the database failed, and we don't care at this point because the download will be changing state to DOWNLOAD_DOWNLOADING very soon *and* dispatching to the listeners happened. The download can still happen, it just might not show up in the UI right away. > nsIWebBrowserPersist::PERSIST_FLAGS_AUTODETECT_APPLY_CONVERSION); >- NS_ENSURE_SUCCESS(rv, rv); >+ if (NS_FAILED(rv)) { >+ dl->mCancelable = nsnull; >+ (void)wbp->SetProgressListener(nsnull); >+ return rv; >+ } We don't care of setting the progress listener fails because we are already in a failure state. The previous warning is more useful than this one (we have to do this however to prevent cycles from forming from a failure). >- NS_ENSURE_SUCCESS(rv, rv); >+ if (NS_FAILED(rv)) { >+ dl->mCancelable = nsnull; >+ (void)wbp->SetProgressListener(nsnull); >+ return rv; >+ } ditto >+ (void)dl->SetState(nsIDownloadManager::DOWNLOAD_QUEUED); same as previous reasoning for SetState >+ rv = wbp->SaveURI(dl->mSource, nsnull, nsnull, nsnull, nsnull, dl->mTarget); >+ if (NS_FAILED(rv)) { >+ dl->mCancelable = nsnull; >+ (void)wbp->SetProgressListener(nsnull); >+ return rv; >+ } ditto
Attachment #276423 -
Flags: review?(mano)
Comment 17•17 years ago
|
||
Comment on attachment 276423 [details] [diff] [review] v1.1 ok, r=mano.
Attachment #276423 -
Flags: review?(mano) → review+
Assignee | ||
Comment 18•17 years ago
|
||
Checking in toolkit/components/downloads/public/nsIDownloadManager.idl; new revision: 1.15; previous revision: 1.14 Checking in toolkit/components/downloads/src/nsDownloadManager.h; new revision: 1.33; previous revision: 1.32 Checking in toolkit/components/downloads/src/nsDownloadManager.cpp; new revision: 1.101; previous revision: 1.100 Checking in toolkit/mozapps/downloads/content/download.xml; new revision: 1.34; previous revision: 1.33 Checking in toolkit/mozapps/downloads/content/DownloadProgressListener.js; new revision: 1.22; previous revision: 1.21 Checking in toolkit/components/downloads/test/unit/head_download_manager.js; new revision: 1.5; previous revision: 1.4
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 19•17 years ago
|
||
Verified FIXED using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a8pre) Gecko/2007081705 Minefield/3.0a8pre and the STR in comment 0.
Status: RESOLVED → VERIFIED
Updated•16 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•