1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-08 05:27:14 +09:00

LibJS: Remove redundant VERIFY in run_executable()

Getting the running_execution_context() already verifies that the
execution context stack is non-empty, we don't need to do it separately
here as well.
This commit is contained in:
Andreas Kling 2025-04-28 20:41:26 +02:00 committed by Andreas Kling
parent 6de1a0aeaf
commit 95ba74d934
Notes: github-actions[bot] 2025-04-29 00:10:56 +00:00

View file

@ -726,8 +726,6 @@ Interpreter::ResultAndReturnRegister Interpreter::run_executable(Executable& exe
TemporaryChange restore_global_object { m_global_object, GC::Ptr { m_realm->global_object() } };
TemporaryChange restore_global_declarative_environment { m_global_declarative_environment, GC::Ptr { m_realm->global_environment().declarative_record() } };
VERIFY(!vm().execution_context_stack().is_empty());
auto& running_execution_context = vm().running_execution_context();
u32 registers_and_constants_and_locals_count = executable.number_of_registers + executable.constants.size() + executable.local_variable_names.size();
VERIFY(registers_and_constants_and_locals_count <= running_execution_context.registers_and_constants_and_locals_and_arguments_span().size());