Closed Bug 514575 Opened 12 years ago Closed 12 years ago
ES5 strict mode: redeclaration of eval or arguments is not permitted
From ES5 Annex C: It is a SyntaxError if a VariableDeclaration or VariableDeclarationNoIn occurs within strict code and its Identifier is eval or arguments (12.2.1).
Assignee: general → jim
Status: NEW → ASSIGNED
Attachment #404933 - Flags: review?(sayrer)
Now, with tests. sayrer said he wasn't the right person to review this, so mrbkap gets tagged.
Comment on attachment 412439 [details] [diff] [review] Forbid rebinding 'eval' or 'arguments' in ES5 strict mode code. +++ b/js/src/jsparse.cpp @@ -1220,41 +1220,89 @@ CheckStrictAssignment(JSContext *cx, JST + js_ReportStrictModeError(cx, TS(tc->compiler), tc, pn, + JSMSG_BAD_BINDING, name); Nit: second line is underindented by one space.
Attachment #412439 - Flags: review?(mrbkap) → review+
This patch added TCF_FUN_PARAM_EVAL but used 0x10000 for its value, which collides with the value of the pre-existing TCF_DECL_DESTRUCTURING macro. Please file and fix, r?mrbkap :-/. /be
(In reply to comment #9) > This patch added TCF_FUN_PARAM_EVAL but used 0x10000 for its value, which > collides with the value of the pre-existing TCF_DECL_DESTRUCTURING macro. > Please file and fix, r?mrbkap :-/. Filed as bug 532254.
Fixed in m-c a while ago: http://hg.mozilla.org/mozilla-central/rev/ace9ea745215 /be
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.