Last Comment Bug 694360 - Permit unicode escape sequences in keywords (thi\u0073 is a keyword, not an identifier)
: Permit unicode escape sequences in keywords (thi\u0073 is a keyword, not an i...
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Other Branch
: x86 Mac OS X
: -- normal with 1 vote (vote)
: mozilla10
Assigned To: AWAY Tom Schuster [:evilpie]
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-13 10:25 PDT by Jason Orendorff [:jorendorff]
Modified: 2013-10-30 06:47 PDT (History)
6 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 detect unicode escaped keywords (7.26 KB, patch)
2011-10-17 09:22 PDT, AWAY Tom Schuster [:evilpie]
jorendorff: review+
Details | Diff | Splinter Review

Description Jason Orendorff [:jorendorff] 2011-10-13 10:25:08 PDT
This should be a SyntaxError:
  var thi\u0073;
Currently we permit it and actually declare a variable named "this" (although we ban it in strict mode, apparently by accident rather than by design).

See discussion here:
  https://mail.mozilla.org/pipermail/es-discuss/2011-June/015389.html

The most persuasive response was Allen Wirfs-Brock's interpretation of ES5:
  https://mail.mozilla.org/pipermail/es-discuss/2011-June/015422.html

No one really disagreed.
Comment 1 AWAY Tom Schuster [:evilpie] 2011-10-17 09:22:25 PDT
Created attachment 567474 [details] [diff] [review]
v1 detect unicode escaped keywords
Comment 2 Jason Orendorff [:jorendorff] 2011-10-17 09:32:36 PDT
Comment on attachment 567474 [details] [diff] [review]
v1 detect unicode escaped keywords

throws() has a bug: if eval(code) does not throw, the test passes.

r=me with that fixed. Thanks!
Comment 3 AWAY Tom Schuster [:evilpie] 2011-10-17 14:36:58 PDT
http://hg.mozilla.org/integration/mozilla-inbound/
Comment 4 Marco Bonardo [::mak] 2011-10-18 05:34:20 PDT
https://hg.mozilla.org/mozilla-central/rev/56c27cde0643

Note You need to log in before you can comment on or make changes to this bug.