Closed Bug 695811 Opened 13 years ago Closed 11 years ago

Checking for updates logs two warnings about deprecated XMLHttpRequest attributes

Categories

(Toolkit :: Application Update, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: KWierso, Assigned: robert.strong.bugs)

References

Details

Attachments

(1 file)

Whenever I open Nightly's About page (which then triggers an automatic check for application updates), two warnings get logged to the error console:

Warning: Use of XMLHttpRequest's progress events' position attribute is deprecated.
Source File: chrome://browser/content/aboutDialog.xul
Line: 0

Warning: Use of XMLHttpRequest's progress events' totalSize attribute is deprecated.
Source File: chrome://browser/content/aboutDialog.xul
Line: 0


Probably shouldn't be using deprecated attributes if it can be avoided.
OS: Windows NT → All
Hardware: x86_64 → All
Attached patch patch rev1Splinter Review
I'll get someone from B2G to review this as well after this review.
Assignee: nobody → robert.bugzilla
Status: NEW → ASSIGNED
Attachment #708451 - Flags: review?(netzen)
Comment on attachment 708451 [details] [diff] [review]
patch rev1

Review of attachment 708451 [details] [diff] [review]:
-----------------------------------------------------------------

Other than the below question everything looks good.

::: toolkit/mozapps/update/content/updates.js
@@ -617,5 @@
>       */
> -    onProgress: function(request, position, totalSize) {
> -      var pm = document.getElementById("checkingProgress");
> -      pm.mode = "normal";
> -      pm.value = Math.floor(100 * (position / totalSize));

Does this not need to be updated?
http://dxr.mozilla.org/mozilla-central/toolkit/mozapps/update/content/updates.xul.html#l45
(In reply to Brian R. Bondy [:bbondy] from comment #3)
> Comment on attachment 708451 [details] [diff] [review]
> patch rev1
> 
> Review of attachment 708451 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Other than the below question everything looks good.
> 
> ::: toolkit/mozapps/update/content/updates.js
> @@ -617,5 @@
> >       */
> > -    onProgress: function(request, position, totalSize) {
> > -      var pm = document.getElementById("checkingProgress");
> > -      pm.mode = "normal";
> > -      pm.value = Math.floor(100 * (position / totalSize));
> 
> Does this not need to be updated?
> http://dxr.mozilla.org/mozilla-central/toolkit/mozapps/update/content/
> updates.xul.html#l45
No. Before this patch it would change the progressmeter to a normaal progressmeter and with the patch it just stays as an undetermined progressmeter. With the xml file being so small this won't make a noticeable difference to the user since it only changes after the download has started and then after the download is finished it moves to the next page.
Comment on attachment 708451 [details] [diff] [review]
patch rev1

Review of attachment 708451 [details] [diff] [review]:
-----------------------------------------------------------------

r+ given that keeping it indeterminate is ok.
Attachment #708451 - Flags: review?(netzen) → review+
Comment on attachment 708451 [details] [diff] [review]
patch rev1

This removes onprogress from the update check interface since it isn't needed and causes a deprecated warning. Could you review the B2G changes?
Attachment #708451 - Flags: review?(dhylands)
(In reply to Robert Strong [:rstrong] (do not email) from comment #6)
> Comment on attachment 708451 [details] [diff] [review]
> patch rev1
> 
> This removes onprogress from the update check interface since it isn't
> needed and causes a deprecated warning. Could you review the B2G changes?

Be happy to. I probably won't get to it until tomorrow though.
Comment on attachment 708451 [details] [diff] [review]
patch rev1

Review of attachment 708451 [details] [diff] [review]:
-----------------------------------------------------------------

Looks fine to me.
Attachment #708451 - Flags: review?(dhylands) → review+
[Had you really wanted to show progress you could have switched to loaded and total instead.]
Depends on: 616672
https://hg.mozilla.org/mozilla-central/rev/a1716a79f81b
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: