Closed Bug 958734 Opened 6 years ago Closed 6 years ago

JavaScript Warning: "test for equality (==) mistyped as assignment (=)?" {file: "chrome://browser/content/JSDOMParser.js" line: 782

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 29

People

(Reporter: dholbert, Assigned: dholbert)

References

Details

Attachments

(1 file)

Noticed this go by in the logcat spew, while running a debug Fennec build today:
{
E/GeckoConsole(25873): [JavaScript Warning: "test for equality (==) mistyped as assignment (=)?" {file: "chrome://browser/content/JSDOMParser.js" line: 782 column: 36 source: "      while (child = this.readNode()) {
}

The code is here:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/JSDOMParser.js?rev=7b389768f788#782


Looks like the assignment is intentional. We should just add another layer of parens to silence the warning.
Attached patch fixSplinter Review
Attachment #8358656 - Flags: review?(bnicholson)
Comment on attachment 8358656 [details] [diff] [review]
fix

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

Thanks, nice catch.
Attachment #8358656 - Flags: review?(bnicholson) → review+
Blocks: 880913
https://hg.mozilla.org/integration/mozilla-inbound/rev/744f49b625e9
Flags: in-testsuite-
Version: unspecified → Trunk
https://hg.mozilla.org/mozilla-central/rev/744f49b625e9
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
You need to log in before you can comment on or make changes to this bug.