mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:58:11 +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
|
@ -566,7 +566,7 @@ ThrowCompletionOr<Object*> Value::to_object(VM& vm) const
|
|||
// String
|
||||
case STRING_TAG:
|
||||
// Return a new String object whose [[StringData]] internal slot is set to argument. See 22.1 for a description of String objects.
|
||||
return StringObject::create(realm, const_cast<JS::PrimitiveString&>(as_string()), *realm.intrinsics().string_prototype()).ptr();
|
||||
return MUST_OR_THROW_OOM(StringObject::create(realm, const_cast<JS::PrimitiveString&>(as_string()), *realm.intrinsics().string_prototype())).ptr();
|
||||
// Symbol
|
||||
case SYMBOL_TAG:
|
||||
// Return a new Symbol object whose [[SymbolData]] internal slot is set to argument. See 20.4 for a description of Symbol objects.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue