mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 16:45:03 +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
@@ -59,7 +59,7 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
|
||||
execution_context.realm = &m_realm;
|
||||
// FIXME: How do we know if we're in strict mode? Maybe the Bytecode::Block should know this?
|
||||
// execution_context.is_strict_mode = ???;
|
||||
MUST(vm().push_execution_context(execution_context, global_object()));
|
||||
vm().push_execution_context(execution_context);
|
||||
pushed_execution_context = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user