mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:48:12 +00:00
LibJS: Make Value::to_string_without_side_effects() infallible
Work towards #20449.
This commit is contained in:
parent
b8f78c0adc
commit
97ebfd9f0f
69 changed files with 182 additions and 182 deletions
|
@ -316,11 +316,11 @@ ThrowCompletionOr<ECMAScriptFunctionObject*> ClassExpression::create_class_const
|
|||
if (super_class.is_null()) {
|
||||
proto_parent = nullptr;
|
||||
} else if (!super_class.is_constructor()) {
|
||||
return vm.throw_completion<TypeError>(ErrorType::ClassExtendsValueNotAConstructorOrNull, TRY_OR_THROW_OOM(vm, super_class.to_string_without_side_effects()));
|
||||
return vm.throw_completion<TypeError>(ErrorType::ClassExtendsValueNotAConstructorOrNull, super_class.to_string_without_side_effects());
|
||||
} else {
|
||||
auto super_class_prototype = TRY(super_class.get(vm, vm.names.prototype));
|
||||
if (!super_class_prototype.is_null() && !super_class_prototype.is_object())
|
||||
return vm.throw_completion<TypeError>(ErrorType::ClassExtendsValueInvalidPrototype, TRY_OR_THROW_OOM(vm, super_class_prototype.to_string_without_side_effects()));
|
||||
return vm.throw_completion<TypeError>(ErrorType::ClassExtendsValueInvalidPrototype, super_class_prototype.to_string_without_side_effects());
|
||||
|
||||
if (super_class_prototype.is_null())
|
||||
proto_parent = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue