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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 13 13:04:58 PDT 2020


--- Comment #3 from Yusuke Suzuki <ysuzuki at apple.com> ---
I think we should have a fallback path for surrogate pairs. Something like this.

if (!isIdentStart(code)) {
    // Check whether the code is leading surrogate.
    if (!isLeadSurrogate(code))
        goto fail;
    codeNext = getOneCharacter();
    if (!isTrailSurrogate(codeNext))
        goto fail;
    codePoint = codePointFromSurrogatePair(code, codeNext);
    if (!isIdentStart(codePoint))
        goto fail;

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/20200313/4849bb59/attachment.htm>

More information about the webkit-unassigned mailing list