mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +00:00
LibJS: Propagate the OOM error from setting the String length property
This commit is contained in:
parent
b75b7f0c0d
commit
8414734a2d
4 changed files with 6 additions and 7 deletions
|
@ -63,7 +63,7 @@ ThrowCompletionOr<NonnullGCPtr<Object>> StringConstructor::construct(FunctionObj
|
|||
else
|
||||
primitive_string = TRY(vm.argument(0).to_primitive_string(vm));
|
||||
auto* prototype = TRY(get_prototype_from_constructor(vm, new_target, &Intrinsics::string_prototype));
|
||||
return StringObject::create(realm, *primitive_string, *prototype);
|
||||
return MUST_OR_THROW_OOM(StringObject::create(realm, *primitive_string, *prototype));
|
||||
}
|
||||
|
||||
// 22.1.2.4 String.raw ( template, ...substitutions ), https://tc39.es/ecma262/#sec-string.raw
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue