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:
parent
ee3a73ddbb
commit
7fef8c5648
Notes:
sideshowbarker
2024-07-18 11:34:08 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/7fef8c56487
1 changed files with 1 additions and 0 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Reference in a new issue