Closed
Bug 514562
Opened 14 years ago
Closed 13 years ago
ES5 strict mode: no assignments to eval
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: jimb, Assigned: jimb)
References
(Blocks 1 open bug)
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 2 obsolete files)
10.85 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
From ES5 Appendix C: The identifier eval may not appear as the LeftHandSideExpression of an Assignment operator (11.13) or of a PostfixExpression (11.3) or as the UnaryExpression operated upon by a Prefix Increment (11.4.4) or a Prefix Decrement (11.4.5) operator.
Assignee | ||
Comment 1•14 years ago
|
||
Assignee: general → jim
Attachment #404929 -
Flags: review?
Assignee | ||
Updated•14 years ago
|
Attachment #404929 -
Flags: review? → review?(sayrer)
Assignee | ||
Comment 3•14 years ago
|
||
Fold in 'arguments' case. Although the two are phrased differently in the standard, if one accounts for the erratum on this topic they end up being equivalent. ---- The ES5 spec requires that a TypeError be raised when an assignment to "arguments" is evaluated in strict function code. That is, the spec requires the code: function f(x) { 'use strict'; if (x) arguments=1; } f(false); to run without error. Conversation on es5-discuss determined that this is an error in the spec, noted in one of the meetings, that never got fixed in the text. Raising a syntax error at compile time is the proper behavior.
Attachment #404929 -
Attachment is obsolete: true
Attachment #405882 -
Flags: review?(sayrer)
Attachment #404929 -
Flags: review?(sayrer)
Assignee | ||
Comment 4•14 years ago
|
||
Now, with tests.
Attachment #405882 -
Attachment is obsolete: true
Attachment #412436 -
Flags: review?(mrbkap)
Attachment #405882 -
Flags: review?(sayrer)
Updated•14 years ago
|
Attachment #412436 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 5•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/10046964146a
Status: NEW → ASSIGNED
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Updated•14 years ago
|
Flags: in-testsuite+
Comment 6•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/10046964146a I suppose this bug is fixed?
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•