diff options
author | Linus Groh <mail@linusgroh.de> | 2022-03-17 22:40:17 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-18 01:12:12 +0100 |
commit | 9422ae9bb2630f65280c5c1a7e3cd748cafe8ce7 (patch) | |
tree | f4bdc720c83ace289535321db80c0a0a19b692db /Userland/Applications | |
parent | 50ad8d2a5ad00481c8e33f9987514fb9e917f620 (diff) | |
download | serenity-9422ae9bb2630f65280c5c1a7e3cd748cafe8ce7.zip |
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.
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/Spreadsheet/Workbook.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Applications/Spreadsheet/Workbook.cpp b/Userland/Applications/Spreadsheet/Workbook.cpp index d67394e040..6756b9eafb 100644 --- a/Userland/Applications/Spreadsheet/Workbook.cpp +++ b/Userland/Applications/Spreadsheet/Workbook.cpp @@ -39,8 +39,7 @@ Workbook::Workbook(NonnullRefPtrVector<Sheet>&& sheets, GUI::Window& parent_wind m_main_execution_context.variable_environment = &m_interpreter->realm().global_environment(); m_main_execution_context.realm = &m_interpreter->realm(); m_main_execution_context.is_strict_mode = true; - MUST(m_vm->push_execution_context(m_main_execution_context, m_interpreter->global_object())); - + m_vm->push_execution_context(m_main_execution_context); m_vm->enable_default_host_import_module_dynamically_hook(); } |