LibJS: Protect execution context variable environments from GC

At the moment these environments are always the same as the lexical
ones, so this didn't cause any trouble. Once we start separating them
we have to make sure both environments are protected.
This commit is contained in:
Andreas Kling 2021-06-24 20:10:31 +02:00
parent ee3a73ddbb
commit 7fef8c5648
Notes: sideshowbarker 2024-07-18 11:34:08 +09:00

View File

@ -106,6 +106,7 @@ void VM::gather_roots(HashTable<Cell*>& roots)
roots.set(&argument.as_cell());
}
roots.set(execution_context->lexical_environment);
roots.set(execution_context->variable_environment);
}
#define __JS_ENUMERATE(SymbolName, snake_name) \