1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:17:45 +00:00

LibTest: Remove uses of TRY_OR_DISCARD() from JavaScriptTestRunner

In one case we can replace it with MUST() and accept the crash (we also
VERIFY() that there wasn't an exception); in the other case we don't
need to return after a throw completion.
This commit is contained in:
Linus Groh 2022-01-04 22:45:58 +01:00
parent 6c9cf4d31a
commit c4f0f1cc05

View file

@ -336,7 +336,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());
TRY_OR_DISCARD(bytecode_interpreter.run(executable));
MUST(bytecode_interpreter.run(executable));
} else {
interpreter->run(interpreter->global_object(), m_test_script->parse_node());
}
@ -352,7 +352,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());
TRY_OR_DISCARD(bytecode_interpreter.run(executable));
(void)bytecode_interpreter.run(executable);
} else {
interpreter->run(interpreter->global_object(), file_script.value()->parse_node());
}