Closed Bug 868604 Opened 8 years ago Closed 8 years ago

JavaScript Warning "test for equality (==) mistyped as assignment (=)?" in "chrome://browser/content/downloads.js"

Categories

(Firefox for Android Graveyard :: Download Manager, defect)

defect
Not set
normal

Tracking

(firefox22 wontfix, firefox23 fixed)

RESOLVED FIXED
Firefox 23
Tracking Status
firefox22 --- wontfix
firefox23 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

Details

Attachments

(2 files)

I see this annoying warning in logcat every time I start Firefox:

  E/GeckoConsole(30193): [JavaScript Warning: "SyntaxError: test for equality (==) mistyped as assignment (=)?" {file: "chrome://browser/content/downloads.js" line: 103 column: 50 source: "    while (download = this._privateDownloads.pop()) {
Attachment #745361 - Flags: review?(bnicholson)
Comment on attachment 745361 [details] [diff] [review]
fix-downloads-warning.patch

If you don't want the extra code, I think adding an extra set of parentheses inside of the while loop will make the assignment explicit and avoids this warning.
Attachment #745361 - Flags: review?(bnicholson) → review+
(In reply to Brian Nicholson (:bnicholson) from comment #1)
> Comment on attachment 745361 [details] [diff] [review]
> fix-downloads-warning.patch
> 
> If you don't want the extra code, I think adding an extra set of parentheses
> inside of the while loop will make the assignment explicit and avoids this
> warning.

I'll use your suggestion. :)

(carrying forward r=bnicholson)
Attachment #745430 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/75c66fa0109e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.