LibJS: Convert Object::get() to ThrowCompletionOr

To no one's surprise, this patch is pretty big - this is possibly the
most used AO of all of them. Definitely worth it though.
This commit is contained in:
Linus Groh 2021-10-02 23:52:27 +01:00
commit b7e5f08e56
Notes: sideshowbarker 2024-07-18 03:07:41 +09:00
61 changed files with 326 additions and 686 deletions

View file

@ -140,9 +140,7 @@ ThrowCompletionOr<PartialUnregulatedTemporalTime> to_partial_time(GlobalObject&
// a. Let property be the Property value of the current row.
// b. Let value be ? Get(temporalTimeLike, property).
auto value = temporal_time_like.get(property);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto value = TRY(temporal_time_like.get(property));
// c. If value is not undefined, then
if (!value.is_undefined()) {
@ -367,9 +365,7 @@ ThrowCompletionOr<UnregulatedTemporalTime> to_temporal_time_record(GlobalObject&
// a. Let property be the Property value of the current row.
// b. Let value be ? Get(temporalTimeLike, property).
auto value = temporal_time_like.get(property);
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto value = TRY(temporal_time_like.get(property));
// c. If value is undefined, then
if (value.is_undefined()) {