1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:37:35 +00:00

LibJS: Move the current exception from Interpreter to VM

This will allow us to throw exceptions even when there is no active
interpreter in the VM.
This commit is contained in:
Andreas Kling 2020-09-21 15:28:09 +02:00
parent 675b482fe7
commit 4a8bfcdd1c
12 changed files with 26 additions and 23 deletions

View file

@ -361,7 +361,7 @@ static bool parse_and_run(JS::Interpreter& interpreter, const StringView& source
for (auto& function_name : trace)
printf(" -> %s\n", function_name.characters());
}
interpreter.clear_exception();
interpreter.vm().clear_exception();
return false;
}
if (s_print_last_result)