mirror of
https://github.com/SerenityOS/serenity
synced 2026-05-05 22:52:10 +02:00
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:
@@ -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) \
|
||||
|
||||
Reference in New Issue
Block a user