1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-28 17:02:12 +00:00

LibJS: Remove vm.construct and it's usages

This commit is contained in:
Idan Horowitz 2021-10-23 01:49:10 +03:00
parent 66770de264
commit e26d9f419b
11 changed files with 39 additions and 79 deletions

View file

@ -95,7 +95,7 @@ JS_DEFINE_OLD_NATIVE_FUNCTION(ReflectObject::construct)
auto args = TRY_OR_DISCARD(create_list_from_array_like(global_object, arguments_list));
// 5. Return ? Construct(target, args, newTarget).
return vm.construct(target.as_function(), new_target.as_function(), move(args));
return TRY_OR_DISCARD(JS::construct(global_object, target.as_function(), move(args), &new_target.as_function()));
}
// 28.1.3 Reflect.defineProperty ( target, propertyKey, attributes ), https://tc39.es/ecma262/#sec-reflect.defineproperty