mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:27:45 +00:00
LibJS: Convert ordinary_set_with_own_descriptor() to ThrowCompletionOr
This commit is contained in:
parent
3b59a4577d
commit
2f42675ebd
3 changed files with 10 additions and 18 deletions
|
@ -2064,10 +2064,7 @@ JS::ThrowCompletionOr<bool> @class_name@::internal_set(JS::PropertyName const& p
|
|||
// 3. Perform ? OrdinarySetWithOwnDescriptor(O, P, V, Receiver, ownDesc).
|
||||
// NOTE: The spec says "perform" instead of "return", meaning nothing will be returned on this path according to the spec, which isn't possible to do.
|
||||
// Let's treat it as though it says "return" instead of "perform".
|
||||
auto result = ordinary_set_with_own_descriptor(property_name, value, receiver, own_descriptor);
|
||||
if (auto* exception = vm.exception())
|
||||
return JS::throw_completion(exception->value());
|
||||
return result;
|
||||
return ordinary_set_with_own_descriptor(property_name, value, receiver, own_descriptor);
|
||||
}
|
||||
)~~~");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue