From 861815596fdaef0fb109c919d1d0844593fbf73a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 27 Sep 2020 20:15:47 +0200 Subject: LibWeb: Bypass the JS::Interpreter when invoking JS event callbacks Use VM::call() instead of Interpreter::call(). --- Libraries/LibWeb/DOM/EventDispatcher.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Libraries') diff --git a/Libraries/LibWeb/DOM/EventDispatcher.cpp b/Libraries/LibWeb/DOM/EventDispatcher.cpp index 682ce91a09..eb3e212db9 100644 --- a/Libraries/LibWeb/DOM/EventDispatcher.cpp +++ b/Libraries/LibWeb/DOM/EventDispatcher.cpp @@ -45,10 +45,10 @@ void EventDispatcher::dispatch(EventTarget& target, NonnullRefPtr event) auto& global_object = function.global_object(); auto* this_value = Bindings::wrap(global_object, target); - auto& interpreter = target.script_execution_context()->interpreter(); - (void)interpreter.call(function, this_value, Bindings::wrap(global_object, target)); - if (interpreter.exception()) - interpreter.vm().clear_exception(); + auto& vm = global_object.vm(); + (void)vm.call(function, this_value, Bindings::wrap(global_object, target)); + if (vm.exception()) + vm.clear_exception(); } } -- cgit v1.2.3