mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 07:36:50 +00:00
LibJS: Add infallible variant of VM::push_execution_context()
It makes no sense to require passing a global object and doing a stack space check in some cases where running out of stack is highly unlikely, we can't recover from errors, and currently ignore the result anyway. This is most commonly in constructors and when setting things up, rather than regular function calls.
This commit is contained in:
committed by
Andreas Kling
parent
50ad8d2a5a
commit
9422ae9bb2
@@ -363,7 +363,7 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
|
||||
JS::Bytecode::Interpreter bytecode_interpreter(interpreter->global_object(), interpreter->realm());
|
||||
MUST(bytecode_interpreter.run(*executable));
|
||||
} else {
|
||||
g_vm->push_execution_context(global_execution_context, interpreter->global_object());
|
||||
g_vm->push_execution_context(global_execution_context);
|
||||
MUST(interpreter->run(*test_script));
|
||||
g_vm->pop_execution_context();
|
||||
}
|
||||
@@ -382,7 +382,7 @@ inline JSFileResult TestRunner::run_file_test(const String& test_path)
|
||||
(void)bytecode_interpreter.run(*executable);
|
||||
}
|
||||
} else {
|
||||
g_vm->push_execution_context(global_execution_context, interpreter->global_object());
|
||||
g_vm->push_execution_context(global_execution_context);
|
||||
(void)interpreter->run(file_script.value());
|
||||
g_vm->pop_execution_context();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user