summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordavidot <david.tuin@gmail.com>2021-07-25 11:51:33 +0200
committerLinus Groh <mail@linusgroh.de>2021-08-16 23:20:04 +0100
commite31b715808fff36d7b4f1788503a603adac0b56f (patch)
treeb19e0487ebc2f9af91c7f9bae414bbff9be7b539
parentbe3b4a68d223ae8d92a15d6dc89ff7c7b9f947bf (diff)
downloadserenity-e31b715808fff36d7b4f1788503a603adac0b56f.zip
LibJS: Make functions reset break and continue context
-rw-r--r--Userland/Libraries/LibJS/Parser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Parser.cpp b/Userland/Libraries/LibJS/Parser.cpp
index 01ef13272a..e5d6724eca 100644
--- a/Userland/Libraries/LibJS/Parser.cpp
+++ b/Userland/Libraries/LibJS/Parser.cpp
@@ -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);