summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-08-21 19:24:32 +0100
committerLinus Groh <mail@linusgroh.de>2022-08-23 13:58:30 +0100
commit25849f8a6daf6c73e11851e94aa3edeb00190d01 (patch)
treecb7e78ca5e0153a9695792ee54e976462e93bdc6 /Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp
parent7856886ed5953e35a210c2b95cb9fdc8d3bb0c60 (diff)
downloadserenity-25849f8a6daf6c73e11851e94aa3edeb00190d01.zip
LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]
Diffstat (limited to 'Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp')
-rw-r--r--Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp
index 59d3eca956..5c7edc4bc2 100644
--- a/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp
+++ b/Userland/Libraries/LibWeb/Bindings/MainThreadVM.cpp
@@ -129,8 +129,6 @@ JS::VM& main_thread_vm()
// 8.1.5.3.1 HostCallJobCallback(callback, V, argumentsList), https://html.spec.whatwg.org/multipage/webappapis.html#hostcalljobcallback
vm->host_call_job_callback = [](JS::JobCallback& callback, JS::Value this_value, JS::MarkedVector<JS::Value> arguments_list) {
- auto& realm = *vm->current_realm();
- auto& global_object = realm.global_object();
auto& callback_host_defined = verify_cast<WebEngineCustomJobCallbackData>(*callback.custom_data);
// 1. Let incumbent settings be callback.[[HostDefined]].[[IncumbentSettings]]. (NOTE: Not necessary)
@@ -144,7 +142,7 @@ JS::VM& main_thread_vm()
vm->push_execution_context(*callback_host_defined.active_script_context);
// 5. Let result be Call(callback.[[Callback]], V, argumentsList).
- auto result = JS::call(global_object, *callback.callback.cell(), this_value, move(arguments_list));
+ auto result = JS::call(*vm, *callback.callback.cell(), this_value, move(arguments_list));
// 6. If script execution context is not null, then pop script execution context from the JavaScript execution context stack.
if (callback_host_defined.active_script_context) {