1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17: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

@ -81,6 +81,8 @@ VM::InterpreterExecutionScope::~InterpreterExecutionScope()
void VM::gather_roots(HashTable<Cell*>& roots)
{
if (m_exception)
roots.set(m_exception);
for (auto* interpreter : m_interpreters)
interpreter->gather_roots(roots);
}