Closed
Bug 514575
Opened 16 years ago
Closed 15 years ago
ES5 strict mode: redeclaration of eval or arguments is not permitted
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, 1 obsolete file)
31.77 KB,
patch
|
mrbkap
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Comment 1•16 years ago
|
||
Assignee | ||
Comment 6•16 years ago
|
||
Now, with tests. sayrer said he wasn't the right person to review this, so mrbkap gets tagged.
Attachment #404933 -
Attachment is obsolete: true
Attachment #412439 -
Flags: review?(mrbkap)
Attachment #404933 -
Flags: review?(sayrer)
Comment 7•16 years ago
|
||
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+
Assignee | ||
Comment 8•16 years ago
|
||
Whiteboard: fixed-in-tracemonkey
Assignee | ||
Updated•16 years ago
|
Flags: in-testsuite+
Comment 9•16 years ago
|
||
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
Assignee | ||
Comment 10•16 years ago
|
||
(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.
Comment 11•15 years ago
|
||
Fixed in m-c a while ago:
http://hg.mozilla.org/mozilla-central/rev/ace9ea745215
/be
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•