[webkit-changes] [WebKit/WebKit] 5fc81f: [JSC] Fix parsing of private fields with Unicode s...
Ross Kirsling
noreply at github.com
Wed Feb 21 23:13:29 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 5fc81f8795e87f422134be7c28ca4636b1afedf3
https://github.com/WebKit/WebKit/commit/5fc81f8795e87f422134be7c28ca4636b1afedf3
Author: Ross Kirsling <ross.kirsling at sony.com>
Date: 2024-02-21 (Wed, 21 Feb 2024)
Changed paths:
M JSTests/test262/expectations.yaml
M Source/JavaScriptCore/parser/Lexer.cpp
Log Message:
-----------
[JSC] Fix parsing of private fields with Unicode start characters
https://bugs.webkit.org/show_bug.cgi?id=269831
Reviewed by Darin Adler and Yusuke Suzuki.
Our lexer can't currently handle various class-private field names with valid Unicode start characters, like `#`.
After seeing that m_current is '#', we call isSingleCharacterIdentStart(peek(1)), which complains of U16_IS_SURROGATE;
instead of trying to cut a corner, we need to get the next code point from U16_GET, just like we did for m_current.
* JSTests/test262/expectations.yaml:
Mark 24 test cases passing.
* Source/JavaScriptCore/parser/Lexer.cpp:
(JSC::Lexer<T>::lexWithoutClearingLineTerminator):
Use U16_GET when a private field name starts with a non-Latin1 character.
Canonical link: https://commits.webkit.org/275152@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list