JavaScriptCore:
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 06:44:22 +0000 (06:44 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 2 Jan 2008 06:44:22 +0000 (06:44 +0000)
commit42086e5c500f7ab4b76fda6cc0aac4c9e62eadc9
tree910200862964d5d168457331a3a81c5dd36257f9
parentddaf7fe2454466ce23e78cab60f1c0df2c1a9858
JavaScriptCore:

        Reviewed by Eric.

        - fix for http://bugs.webkit.org/show_bug.cgi?id=16695
          JSC allows non-identifier codepoints in identifiers (affects Acid3)

        Test: fast/js/kde/parse.html

        * kjs/lexer.cpp:
        (KJS::Lexer::lex): Added additional states to distinguish Unicode escapes at the
        start of identifiers from ones inside identifiers. Rejected characters that don't pass
        the isIdentStart and isIdentPart tests.
        (KJS::Lexer::convertUnicode): Removed incorrect FIXME comment.

        * kjs/lexer.h: Added new states to distinguish \u escapes at the start of identifiers
        from \u escapes inside identifiers.

LayoutTests:

        Reviewed by Eric.

        - test for http://bugs.webkit.org/show_bug.cgi?id=16695
          JSC allows non-identifier codepoints in identifiers (affects Acid3)

        * fast/js/kde/parse-expected.txt: Updated.
        * fast/js/kde/resources/parse.js: Added tests that cover both the
        non-ASCII characters themselves and the same characters parsed as
        \u sequences.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@29075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/kjs/lexer.cpp
JavaScriptCore/kjs/lexer.h
LayoutTests/ChangeLog
LayoutTests/fast/js/kde/parse-expected.txt
LayoutTests/fast/js/kde/resources/parse.js