1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 01:07:34 +00:00

LibJS: Remove GlobalObject parameter from native functions

This commit is contained in:
Linus Groh 2022-08-22 11:48:08 +01:00
parent 7b990c27a1
commit b465f46e00
77 changed files with 240 additions and 215 deletions

View file

@ -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())