1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00

LibJS: Convert internal_set_prototype_of() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-28 23:54:42 +01:00
parent 5148150e1c
commit 8c81c84c18
20 changed files with 43 additions and 50 deletions

View file

@ -906,7 +906,7 @@ Value ClassExpression::execute(Interpreter& interpreter, GlobalObject& global_ob
class_constructor->define_direct_property(vm.names.prototype, prototype, Attribute::Writable);
if (interpreter.exception())
return {};
class_constructor->internal_set_prototype_of(super_constructor.is_null() ? global_object.function_prototype() : &super_constructor.as_object());
TRY_OR_DISCARD(class_constructor->internal_set_prototype_of(super_constructor.is_null() ? global_object.function_prototype() : &super_constructor.as_object()));
}
auto class_prototype = class_constructor->get(vm.names.prototype);