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

LibJS+LibTest+js: Convert BC::Interpreter::run to ThrowCompletionOr<>

Note that this is just a shallow API change.
This commit is contained in:
Ali Mohammad Pur 2021-11-11 04:11:56 +03:30 committed by Linus Groh
parent 3b0bf05fa5
commit 070d2eaa51
7 changed files with 19 additions and 11 deletions

View file

@ -340,7 +340,7 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
if (JS::Bytecode::g_dump_bytecode)
executable.dump();
JS::Bytecode::Interpreter bytecode_interpreter(interpreter->global_object(), interpreter->realm());
bytecode_interpreter.run(executable);
TRY_OR_DISCARD(bytecode_interpreter.run(executable));
} else {
interpreter->run(interpreter->global_object(), m_test_script->parse_node());
}
@ -356,7 +356,7 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
if (JS::Bytecode::g_dump_bytecode)
executable.dump();
JS::Bytecode::Interpreter bytecode_interpreter(interpreter->global_object(), interpreter->realm());
bytecode_interpreter.run(executable);
TRY_OR_DISCARD(bytecode_interpreter.run(executable));
} else {
interpreter->run(interpreter->global_object(), file_script.value()->parse_node());
}