mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 13:57:35 +00:00
LibWeb: Bypass the JS::Interpreter when invoking JS event callbacks
Use VM::call() instead of Interpreter::call().
This commit is contained in:
parent
063acda76e
commit
861815596f
1 changed files with 4 additions and 4 deletions
|
@ -45,10 +45,10 @@ void EventDispatcher::dispatch(EventTarget& target, NonnullRefPtr<Event> event)
|
||||||
auto& global_object = function.global_object();
|
auto& global_object = function.global_object();
|
||||||
auto* this_value = Bindings::wrap(global_object, target);
|
auto* this_value = Bindings::wrap(global_object, target);
|
||||||
|
|
||||||
auto& interpreter = target.script_execution_context()->interpreter();
|
auto& vm = global_object.vm();
|
||||||
(void)interpreter.call(function, this_value, Bindings::wrap(global_object, target));
|
(void)vm.call(function, this_value, Bindings::wrap(global_object, target));
|
||||||
if (interpreter.exception())
|
if (vm.exception())
|
||||||
interpreter.vm().clear_exception();
|
vm.clear_exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue