mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibJS: Do not execute scripts with parse errors
This adds missing checks in several LibJS consumers.
This commit is contained in:
parent
50b6b6ef86
commit
984c290ec0
Notes:
sideshowbarker
2024-07-19 07:38:28 +09:00
Author: https://github.com/sunverwerth
Commit: 984c290ec0
Pull-request: https://github.com/SerenityOS/serenity/pull/1775
4 changed files with 36 additions and 7 deletions
|
@ -72,7 +72,7 @@ public:
|
|||
NonnullRefPtr<NewExpression> parse_new_expression();
|
||||
RefPtr<FunctionExpression> try_parse_arrow_function_expression(bool expect_parens);
|
||||
|
||||
bool has_errors() const { return m_parser_state.m_has_errors; }
|
||||
bool has_errors() const { return m_parser_state.m_lexer.has_errors() || m_parser_state.m_has_errors; }
|
||||
|
||||
private:
|
||||
int operator_precedence(TokenType) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue