mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibJS: Convert define_properties() to ThrowCompletionOr
This commit is contained in:
parent
0a49a2db60
commit
3b59a4577d
3 changed files with 12 additions and 12 deletions
|
@ -354,7 +354,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::define_properties)
|
|||
}
|
||||
|
||||
// 2. Return ? ObjectDefineProperties(O, Properties).
|
||||
return object.as_object().define_properties(properties);
|
||||
return TRY_OR_DISCARD(object.as_object().define_properties(properties));
|
||||
}
|
||||
|
||||
// 20.1.2.13 Object.is ( value1, value2 ), https://tc39.es/ecma262/#sec-object.is
|
||||
|
@ -411,7 +411,7 @@ JS_DEFINE_NATIVE_FUNCTION(ObjectConstructor::create)
|
|||
// 3. If Properties is not undefined, then
|
||||
if (!properties.is_undefined()) {
|
||||
// a. Return ? ObjectDefineProperties(obj, Properties).
|
||||
return object->define_properties(properties);
|
||||
return TRY_OR_DISCARD(object->define_properties(properties));
|
||||
}
|
||||
|
||||
// 4. Return obj.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue