summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-08-21 14:00:56 +0100
committerLinus Groh <mail@linusgroh.de>2022-08-23 13:58:30 +0100
commita022e548b808df91c471cb55f0245e15957e89c4 (patch)
treed6a7d452eae1d06e537a2fd77348ecaab278614f /Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
parentf6c4a0f5d00a6a03a5165f1618516acb320f13a4 (diff)
downloadserenity-a022e548b808df91c471cb55f0245e15957e89c4.zip
LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]
This is where the fun begins. :^)
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
index 6fc2397b38..8041a8bb21 100644
--- a/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ECMAScriptFunctionObject.cpp
@@ -682,10 +682,10 @@ void ECMAScriptFunctionObject::ordinary_call_bind_this(ExecutionContext& callee_
// b. Else,
else {
// i. Let thisValue be ! ToObject(thisArgument).
- this_value = MUST(this_argument.to_object(global_object()));
+ this_value = MUST(this_argument.to_object(vm));
// ii. NOTE: ToObject produces wrapper objects using calleeRealm.
- // FIXME: It currently doesn't, as we pass the function's global object.
+ VERIFY(vm.current_realm() == callee_realm);
}
}