From 9422ae9bb2630f65280c5c1a7e3cd748cafe8ce7 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Thu, 17 Mar 2022 22:40:17 +0000 Subject: 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. --- Tests/Spreadsheet/test-spreadsheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Tests/Spreadsheet') diff --git a/Tests/Spreadsheet/test-spreadsheet.cpp b/Tests/Spreadsheet/test-spreadsheet.cpp index e3d27895ea..425aedac18 100644 --- a/Tests/Spreadsheet/test-spreadsheet.cpp +++ b/Tests/Spreadsheet/test-spreadsheet.cpp @@ -27,7 +27,7 @@ TESTJS_RUN_FILE_FUNCTION(String const&, JS::Interpreter& interpreter, JS::Execut } auto script = result.release_value(); - interpreter.vm().push_execution_context(global_execution_context, interpreter.realm().global_object()); + interpreter.vm().push_execution_context(global_execution_context); MUST(interpreter.run(*script)); interpreter.vm().pop_execution_context(); }; -- cgit v1.2.3