Closed Bug 381803 Opened 18 years ago Closed 17 years ago

two files are listed in DM, while downloading one file.

Categories

(Toolkit :: Downloads API, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla1.9alpha6

People

(Reporter: bugmozz, Assigned: sdwilsh)

References

Details

(Keywords: regression)

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070523 Minefield/3.0a5pre ID:2007052316 [cairo] range, http://hourly-archive.localgho.st/win32/20070523_1627_checkins.html screenshot, http://img479.imageshack.us/my.php?image=dmon4.jpg
Assignee: nobody → sdwilsh
OS: Windows XP → All
Hardware: PC → All
Severity: normal → major
Blocks: 381538
I saw this before bug 381538 was fixed.
No longer blocks: 381538
Bug 381538 has been fixed but this bug isn't solved yet. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a5pre) Gecko/20070524 Minefield/3.0a5pre
Alright, so looking into this, I am fairly certain it is a race-condition situation. Basically, the database can be updated before we look up the downloads in the window, then we look up the downloads and add them all, and then we get the dl-start notification. This wasn't an issue before because we relied solely on our rdf datasource to display the UI elements. So, I have an easy fix if this is the case, but I'd like to see if I can confirm my findings. I'm having a terrible time reproducing this, so if you do reproduce it, kindly do the following: 1) Open up the DOM Inspector 2) Go to File->Inspect Chrome Document->Downloads 3) Search for downloadView (by id) 4) Make sure View->Show Anonymous Content is selected 5) Expand the richlistbox's children until you get to items that are "download" What I need from this is the id of the two downloads that are the same. I suspect that they are also the same, and that's why one doesn't get updated. If someone can back with me on this (before I can reproduce it), I can confirm my beliefs about this being a race condition, and get an easy fix made up for it.
Status: NEW → ASSIGNED
Attached patch v1.0 (deleted) — Splinter Review
What happens is that it gets added to the database before dispatching dl-start. This is because I moved the dl-start notification in Bug 380250 because when we dispatched it in the past, it hadn't actually started. Alternatively, I can modify the query to not select downloads that have a status of nsIDownloadManager::DOWNLOAD_NOTSTARTED. I'm not so sure I like that approach, however.
Attachment #266121 - Flags: review?(mconnor)
I tried the patch(attachment 266121 [details] [diff] [review]). It seems good to fix the problem.
Flags: blocking-firefox3?
Target Milestone: --- → Firefox 3 alpha6
Blocks: 372972
No longer blocks: 372972
Blocks: 380250
Attachment #266121 - Flags: review?(mconnor) → review+
Checking in toolkit/mozapps/downloads/content/downloads.js; new revision: 1.59; previous revision: 1.58
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
VERIFIED Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070531 Minefield/3.0a5pre ID:2007053120 [cairo]
Status: RESOLVED → VERIFIED
Flags: blocking-firefox3? → blocking-firefox3+
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: