summaryrefslogtreecommitdiff
path: root/Libraries
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-09-27 20:15:47 +0200
committerAndreas Kling <kling@serenityos.org>2020-09-27 20:26:58 +0200
commit861815596fdaef0fb109c919d1d0844593fbf73a (patch)
treef2d9a47c966d8a0549b0efab5564defec322cf6e /Libraries
parent063acda76eef44c6425c0877fd6ccf817bd997f3 (diff)
downloadserenity-861815596fdaef0fb109c919d1d0844593fbf73a.zip
LibWeb: Bypass the JS::Interpreter when invoking JS event callbacks
Use VM::call() instead of Interpreter::call().
Diffstat (limited to 'Libraries')
-rw-r--r--Libraries/LibWeb/DOM/EventDispatcher.cpp8
1 files changed, 4 insertions, 4 deletions
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> 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();
}
}