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/Libraries/LibWeb/DOM/EventTarget.cpp | |
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/Libraries/LibWeb/DOM/EventTarget.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/DOM/EventTarget.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp index 274531e5c4..021a5d7199 100644 --- a/Userland/Libraries/LibWeb/DOM/EventTarget.cpp +++ b/Userland/Libraries/LibWeb/DOM/EventTarget.cpp @@ -372,9 +372,10 @@ Bindings::CallbackType* EventTarget::get_current_value_of_event_handler(FlyStrin return nullptr; } - // 8. Push settings object's realm execution context onto the JavaScript execution context stack; it is now the running JavaScript execution context. auto& global_object = settings_object.global_object(); - global_object.vm().push_execution_context(settings_object.realm_execution_context(), global_object); + + // 8. Push settings object's realm execution context onto the JavaScript execution context stack; it is now the running JavaScript execution context. + global_object.vm().push_execution_context(settings_object.realm_execution_context()); // 9. Let function be the result of calling OrdinaryFunctionCreate, with arguments: // functionPrototype |