summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2022-08-22 11:48:08 +0100
committerLinus Groh <mail@linusgroh.de>2022-08-23 13:58:30 +0100
commitb465f46e009164b5d2659f216b9307efee187222 (patch)
tree33038f3bc2c9d2d7e29c67bdfa94f38b2f761013 /Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
parent7b990c27a14eddd152932d8540afc8c3838030fb (diff)
downloadserenity-b465f46e009164b5d2659f216b9307efee187222.zip
LibJS: Remove GlobalObject parameter from native functions
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
index e9d650426f..c06637492c 100644
--- a/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
+++ b/Userland/Libraries/LibJS/Runtime/ArrayConstructor.cpp
@@ -85,7 +85,7 @@ ThrowCompletionOr<Object*> ArrayConstructor::construct(FunctionObject& new_targe
// 23.1.2.1 Array.from ( items [ , mapfn [ , thisArg ] ] ), https://tc39.es/ecma262/#sec-array.from
JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::from)
{
- auto& realm = *global_object.associated_realm();
+ auto& realm = *vm.current_realm();
auto constructor = vm.this_value();
FunctionObject* map_fn = nullptr;
@@ -177,7 +177,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::is_array)
// 23.1.2.3 Array.of ( ...items ), https://tc39.es/ecma262/#sec-array.of
JS_DEFINE_NATIVE_FUNCTION(ArrayConstructor::of)
{
- auto& realm = *global_object.associated_realm();
+ auto& realm = *vm.current_realm();
auto this_value = vm.this_value();
Object* array;
if (this_value.is_constructor())