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:
parent
2f42675ebd
commit
d7d73f9100
6 changed files with 85 additions and 46 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue