1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:57:45 +00:00

LibJS: Use ThrowCompletionOr in species_constructor()

Also add spec step comments to it as well as a missing exception check
while we're here.
This commit is contained in:
Linus Groh 2021-09-15 21:05:05 +01:00
parent c4c40f4cf3
commit 3d43eb0774
6 changed files with 29 additions and 28 deletions

View file

@ -22,7 +22,7 @@ Reference make_super_property_reference(GlobalObject&, Value actual_this, String
ThrowCompletionOr<Value> require_object_coercible(GlobalObject&, Value);
size_t length_of_array_like(GlobalObject&, Object const&);
ThrowCompletionOr<MarkedValueList> create_list_from_array_like(GlobalObject&, Value, Function<ThrowCompletionOr<void>(Value)> = {});
FunctionObject* species_constructor(GlobalObject&, Object const&, FunctionObject& default_constructor);
ThrowCompletionOr<FunctionObject*> species_constructor(GlobalObject&, Object const&, FunctionObject& default_constructor);
Realm* get_function_realm(GlobalObject&, FunctionObject const&);
bool is_compatible_property_descriptor(bool extensible, PropertyDescriptor const&, Optional<PropertyDescriptor> const& current);
bool validate_and_apply_property_descriptor(Object*, PropertyName const&, bool extensible, PropertyDescriptor const&, Optional<PropertyDescriptor> const& current);