LibJS: Make functions reset break and continue context

This commit is contained in:
davidot 2021-07-25 11:51:33 +02:00 committed by Linus Groh
parent be3b4a68d2
commit e31b715808
Notes: sideshowbarker 2024-07-18 05:37:11 +09:00

View File

@ -1721,6 +1721,8 @@ NonnullRefPtr<FunctionNodeType> Parser::parse_function_node(u8 parse_options)
TemporaryChange super_property_access_rollback(m_state.allow_super_property_lookup, !!(parse_options & FunctionNodeParseOptions::AllowSuperPropertyLookup));
TemporaryChange super_constructor_call_rollback(m_state.allow_super_constructor_call, !!(parse_options & FunctionNodeParseOptions::AllowSuperConstructorCall));
TemporaryChange break_context_rollback(m_state.in_break_context, false);
TemporaryChange continue_context_rollback(m_state.in_continue_context, false);
ScopePusher scope(*this, ScopePusher::Var, Parser::Scope::Function);