Some syntax warning about debugger-controller.js/debugger-view.js when opening debugger.

RESOLVED INVALID

Status

()

Firefox
Developer Tools: Debugger
RESOLVED INVALID
5 years ago
5 years ago

People

(Reporter: tetsuharu, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

[Environment]
* http://hg.mozilla.org/mozilla-central/rev/bfd85c9652fa

[Result]
---------------------
Warning: SyntaxError: test for equality (==) mistyped as assignment (=)?
Source File: chrome://browser/content/debugger-controller.js
Line: 679, Column: 45
Source Code:
    } while (environment = environment.parent); 
--------------------
Warning: SyntaxError: test for equality (==) mistyped as assignment (=)?
Source File: chrome://browser/content/debugger-view.js
Line: 1238, Column: 39
Source Code:
    while (firstChild = list.firstChild) { 
--------------------

[More Info]
Does these notation have some special reason? Or Are these careless mistake?
These are what they're supposed to be -- assignments. Probably adding another pair of parans would silence the warning; something like:
> while ((environment = environment.parent))
I don't think we should abide by the non-standard strict mode warnings.
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.