`\u200c` and `\u200d` should be allowed in IdentifierPart, as per ES5
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 08:20:51 +0000 (08:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Feb 2012 08:20:51 +0000 (08:20 +0000)
commitd5801900de3d75067d4fd749476334032ec8121a
tree60e570ef5b071fe94aaf7d669d707051a907cf03
parentacc6dce1b8b1b8da37d56549e84d887dfda6d28c
`\u200c` and `\u200d` should be allowed in IdentifierPart, as per ES5
https://bugs.webkit.org/show_bug.cgi?id=78908

Source/JavaScriptCore:

Add additional checks for zero-width non-joiner (0x200C) and
zero-width joiner (0x200D) characters.

Patch by Mathias Bynens <mathias@qiwi.be> on 2012-02-24
Reviewed by Michael Saboff.

* parser/Lexer.cpp:
(JSC::isNonASCIIIdentPart)
* runtime/LiteralParser.cpp:
(JSC::::Lexer::lexIdentifier)

LayoutTests:

Patch by Mathias Bynens <mathias@qiwi.be> on 2012-02-24
Reviewed by Michael Saboff.

* fast/js/var-declarations-zero-width-expected.txt: Added.
* fast/js/var-declarations-zero-width.html: Added.
* fast/js/removing-Cf-characters-expected.txt: Removed the ZWJ test.
* fast/js/script-tests/removing-Cf-characters.js: Removed the ZWJ test.
* fast/js/script-tests/var-declarations-zero-width.js: Added.
* platform/chromium/test_expectations.txt: Disable the new test in Chromium, for now.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108742 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/js/removing-Cf-characters-expected.txt
LayoutTests/fast/js/script-tests/removing-Cf-characters.js
LayoutTests/fast/js/script-tests/var-declarations-zero-width.js [new file with mode: 0644]
LayoutTests/fast/js/var-declarations-zero-width-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/var-declarations-zero-width.html [new file with mode: 0644]
LayoutTests/platform/chromium/test_expectations.txt
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Lexer.cpp
Source/JavaScriptCore/runtime/LiteralParser.cpp