Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c7e3a19ed52aadf350e15c18df62e921f479bc26
https://github.com/WebKit/WebKit/commit/c7e3a19ed52aadf350e15c18df62e921f479bc26
Author: Daniel Liu <[email protected]>
Date: 2025-05-09 (Fri, 09 May 2025)
Changed paths:
A
JSTests/stress/lexer-should-ignore-strict-mode-errors-outside-of-class-definition.js
M Source/JavaScriptCore/parser/Lexer.h
M Source/JavaScriptCore/parser/Parser.cpp
Log Message:
-----------
Lexer errors should be cleared before parsing class default initialization
expressions
https://bugs.webkit.org/show_bug.cgi?id=292745
rdar://149546540
Reviewed by Yusuke Suzuki.
Currently, when we have a default initialization expression, we re-parse the
function
in strict mode. To do this, we create a new parser on the entire source code,
and set
the offset of the parser to the selected expression. However, since the parser
passes
through all of the code in the script, the lexer may produce an error on code
that we
do not parse for the expressions. This can lead to debug assertions failing due
to an
incorrectly set error bit.
* Source/JavaScriptCore/parser/Parser.cpp:
(JSC::Parser<LexerType>::parseClassFieldInitializerSourceElements):
Canonical link: https://commits.webkit.org/294718@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes