Skip to content

Commit 015c75a

Browse files
committed
Sync with upstream APIs moving towards more realms
1 parent 279b385 commit 015c75a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static Result<void, TestError> run_program(InterpreterT& interpreter, ScriptOrMo
8787

8888
auto unit_result = JS::Bytecode::Generator::generate(program_node);
8989
if (unit_result.is_error()) {
90-
result = JS::throw_completion(JS::InternalError::create(interpreter.global_object(), String::formatted("TODO({})", unit_result.error().to_string())));
90+
result = JS::throw_completion(JS::InternalError::create(interpreter.realm(), String::formatted("TODO({})", unit_result.error().to_string())));
9191
} else {
9292
auto unit = unit_result.release_value();
9393
auto& passes = JS::Bytecode::Interpreter::optimization_pipeline();
@@ -196,7 +196,7 @@ static Result<void, TestError> run_test(StringView source, StringView filepath,
196196

197197
OwnPtr<JS::Bytecode::Interpreter> bytecode_interpreter = nullptr;
198198
if (s_use_bytecode)
199-
bytecode_interpreter = make<JS::Bytecode::Interpreter>(ast_interpreter->global_object(), ast_interpreter->realm());
199+
bytecode_interpreter = make<JS::Bytecode::Interpreter>(realm);
200200

201201
auto run_with_interpreter = [&](ScriptOrModuleProgram& program) {
202202
if (s_use_bytecode)

0 commit comments

Comments
 (0)