1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:48:11 +00:00

LibJS: Allocate a Realm next to GlobalObject in Interpreter::create()

Also pass a Realm reference to the Bytecode::Interpreter constructor,
just like we pass the GlobalObject.
This commit is contained in:
Linus Groh 2021-09-11 19:36:25 +01:00
parent d9c3bafcd9
commit 2b8d5696ab
8 changed files with 54 additions and 10 deletions

View file

@ -830,7 +830,7 @@ static bool parse_and_run(JS::Interpreter& interpreter, StringView const& source
}
if (s_run_bytecode) {
JS::Bytecode::Interpreter bytecode_interpreter(interpreter.global_object());
JS::Bytecode::Interpreter bytecode_interpreter(interpreter.global_object(), interpreter.realm());
bytecode_interpreter.run(unit);
} else {
return true;