mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
LibJS: Handle continue in switch statement unwinding
This commit is contained in:
parent
8f54edb7a0
commit
f8886ef5ba
2 changed files with 20 additions and 1 deletions
|
@ -1899,7 +1899,8 @@ Value SwitchStatement::execute(Interpreter& interpreter, GlobalObject& global_ob
|
|||
return {};
|
||||
if (interpreter.vm().should_unwind()) {
|
||||
if (interpreter.vm().should_unwind_until(ScopeType::Continuable, m_label)) {
|
||||
ASSERT_NOT_REACHED();
|
||||
// No stop_unwind(), the outer loop will handle that - we just need to break out of the switch/case.
|
||||
return {};
|
||||
} else if (interpreter.vm().should_unwind_until(ScopeType::Breakable, m_label)) {
|
||||
interpreter.vm().stop_unwind();
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue