[Webkit-unassigned] [Bug 208998] New: JavaScript identifier grammar supports unescaped astral symbols, but JSC doesn’t

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Mar 12 08:58:42 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=208998

            Bug ID: 208998
           Summary: JavaScript identifier grammar supports unescaped
                    astral symbols, but JSC doesn’t
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mathias at qiwi.be

Since ES2015, ID_Start or ID_Continue symbols _outside of the BMP_ can be used in identifiers. Example using U+102A7 CARIAN LETTER A2 (taken from https://mathiasbynens.be/notes/javascript-identifiers-es6):

    var ��; // 1
    var \u{102A7}; // 2

Expected result:

The above program evaluates without throwing an exception.

Actual result:

Although JavaScriptCore handles line 2 correctly, it throws on line 1:

    SyntaxError: Invalid character '\ud800'

Note that JSC is the only engine with this bug:

    $ eshost -sx 'var ��'
    #### Chakra, SpiderMonkey, V8, V8 --harmony, XS


    #### JavaScriptCore

    SyntaxError: Invalid character '\ud800'

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200312/3180768f/attachment.htm>


More information about the webkit-unassigned mailing list