1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 09:07:35 +00:00

LibJS: Convert to_property_descriptor() to ThrowCompletionOr

Also add spec step comments to it while we're here.
This commit is contained in:
Linus Groh 2021-10-03 20:07:00 +01:00
parent 2f42675ebd
commit d7d73f9100
6 changed files with 85 additions and 46 deletions

View file

@ -284,9 +284,7 @@ ThrowCompletionOr<Optional<PropertyDescriptor>> ProxyObject::internal_get_own_pr
auto extensible_target = TRY(m_target.is_extensible());
// 13. Let resultDesc be ? ToPropertyDescriptor(trapResultObj).
auto result_desc = to_property_descriptor(global_object, trap_result);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto result_desc = TRY(to_property_descriptor(global_object, trap_result));
// 14. Call CompletePropertyDescriptor(resultDesc).
result_desc.complete();