Closed
Bug 392793
Opened 18 years ago
Closed 18 years ago
invalid (negative) progress percentage displayed in the window title for certain downloads
Categories
(Toolkit :: Downloads API, defect)
Toolkit
Downloads API
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha8
People
(Reporter: asqueella, Assigned: sciguyryan)
Details
(Keywords: regression)
Attachments
(1 file)
1.08 KB,
patch
|
sdwilsh
:
review+
|
Details | Diff | Splinter Review |
When downloading https://bugzilla.mozilla.org/buglist.cgi?query_format=advanced&short_desc_type=allwordssubstr&short_desc=&product=Core&target_milestone=mozilla1.9+M8&long_desc_type=allwordssubstr&long_desc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&resolution=FIXED&emailtype1=substring&email1=&emailtype2=substring&email2=&bugidtype=include&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&cmdtype=doit&order=Reuse+same+sort+as+last+time&field0-0-0=noop&type0-0-0=noop&value0-0-0=
(linked from http://www.mozilla.org/projects/firefox/3.0a8pre/releasenotes/ - A full _Gecko 1.9 bug fix list_), the file size cannot be determined and the download manager shows progress values like "-337000% of 1 file" in the window heading.
Firefox 2 deals fine with unknown file size (no percentage progress is displayed).
Comment 1•18 years ago
|
||
Works for me.
in the latest trunk with the new download manager, I see 'unknown time left'.
Comment 2•18 years ago
|
||
Ditto here, with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a8pre) Gecko/2007081905 Minefield/3.0a8pre (I see what Jo sees); this WFM.
Nickolay, is this with a corrupted downloads.sqlite file?
Reporter | ||
Comment 3•18 years ago
|
||
Stephen: No, this is with a clean profile.
'Unknown time left' is indeed shown next to the specific item, but the window title has this wrong progress value. I just tested with 2007081905, this is WinXP.
Reporter | ||
Comment 4•18 years ago
|
||
So this code uses dl.size no matter what:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/toolkit/mozapps/downloads/content/downloads.js&rev=1.81#373
..and nsIDownload.size returns "LL_MAXUINT" (which gets mapped to -1 in JS for some reason) for downloads of unknown size:
http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/toolkit/components/downloads/public/nsIDownload.idl&rev=1.20
The check of size > 0 was removed in the DM rewrite:
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&root=/cvsroot&subdir=/mozilla/toolkit/mozapps/downloads/content&command=DIFF_FRAMESET&file=downloads.js&rev2=1.69&rev1=1.68
Updated•18 years ago
|
Summary: invalid (negative) progress percentage displayed for certain downloads → invalid (negative) progress percentage displayed in the window title for certain downloads
Assignee | ||
Comment 5•18 years ago
|
||
Try v1.0
Is this what we need?
Assignee: nobody → sciguyryan
Status: NEW → ASSIGNED
Attachment #277401 -
Flags: review?(comrade693+bmo)
Reporter | ||
Comment 6•18 years ago
|
||
It would also be worth checking if the MAX_INT -> -1 mapping for PRUint64 return type is intended...
Comment 7•18 years ago
|
||
Brian, is it the intended behavior of the JS engine to map LL_MAXUINT to -1?
Comment 8•18 years ago
|
||
There is no -1 in unsigned-land. So, likely yes.
Comment 9•18 years ago
|
||
Comment on attachment 277401 [details] [diff] [review]
Try v1.0
r=sdwilsh
Attachment #277401 -
Flags: review?(comrade693+bmo) → review+
Assignee | ||
Comment 10•18 years ago
|
||
Because this is front end and has a r+ does that mean I can put up a checkin request on it or does it need a second review or whatnot?
Comment 11•18 years ago
|
||
(In reply to comment #7)
> Brian, is it the intended behavior of the JS engine to map LL_MAXUINT to -1?
It's XPConnect, not the JS engine. See
http://lxr.mozilla.org/mozilla/source/js/src/xpconnect/src/xpcconvert.cpp#177
/be
Comment 12•18 years ago
|
||
(In reply to comment #10)
> Because this is front end and has a r+ does that mean I can put up a checkin
> request on it or does it need a second review or whatnot?
My review should be sufficient here. If I ever feel it isn't, I'll let you know. Since this is a Firefox UI thing, it also does not need approval yet.
Assignee | ||
Updated•18 years ago
|
Reporter | ||
Comment 13•18 years ago
|
||
mozilla/toolkit/mozapps/downloads/content/downloads.js 1.84
Now showing "100% of 1 file" in this case.. certainly better than -12345%!
Reporter | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
Flags: in-litmus?
http://litmus.mozilla.org/show_test.cgi?id=4596
in-litmus+
If you'd be so kind as to review the testcase when you get a chance, I'd appreciate it!
Flags: in-litmus? → in-litmus+
Reporter | ||
Comment 15•18 years ago
|
||
The test case looks fine, except for me the link cannot be saved as neither on 2.0, nor on a self-built trunk... Don't have the time to track down whether it's due to something in my profile or because of a Firefox bug.
(In reply to comment #15)
> The test case looks fine, except for me the link cannot be saved as neither on
> 2.0, nor on a self-built trunk... Don't have the time to track down whether
> it's due to something in my profile or because of a Firefox bug.
I couldn't save it either, which actually means it's probably a good testcase :-)
(In reply to comment #16)
> (In reply to comment #15)
> > The test case looks fine, except for me the link cannot be saved as neither on
> > 2.0, nor on a self-built trunk... Don't have the time to track down whether
> > it's due to something in my profile or because of a Firefox bug.
>
> I couldn't save it either, which actually means it's probably a good testcase
> :-)
Looks like this is a regression; bug 393895.
(In reply to comment #17)
> (In reply to comment #16)
> > (In reply to comment #15)
> > > The test case looks fine, except for me the link cannot be saved as neither on
> > > 2.0, nor on a self-built trunk... Don't have the time to track down whether
> > > it's due to something in my profile or because of a Firefox bug.
> >
> > I couldn't save it either, which actually means it's probably a good testcase
> > :-)
>
> Looks like this is a regression; bug 393895.
I don't really think it's the same bug, actually, so I spun off bug 394278.
Verified FIXED with Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9a8pre) Gecko/2007082923 Minefield/3.0a8pre; although it goes fast. Bug 394278's testcase would be the best testcase, but I want to get this verified so we'll know in the future if and when it does regress.
I see it quickly jump from 70% or so to "100% of 1 file", even though it's still downloading, but I don't see the negative percentage in comment 0 and comment 3.
Status: RESOLVED → VERIFIED
Updated•17 years ago
|
Product: Firefox → Toolkit
You need to log in
before you can comment on or make changes to this bug.
Description
•