1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:17:44 +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

@ -483,12 +483,6 @@ ThrowCompletionOr<void> VM::initialize_instance_elements(Object& object, ECMAScr
return {};
}
// NOTE: This is a leftover from the old world of vm.call() and vm.construct(). Replace all uses with plain construct() and remove this.
Value VM::construct(FunctionObject& function, FunctionObject& new_target, Optional<MarkedValueList> arguments)
{
return TRY_OR_DISCARD(JS::construct(function.global_object(), function, move(arguments), &new_target));
}
void VM::throw_exception(Exception& exception)
{
set_exception(exception);