LibJS: Convert prepare_temporal_fields() to ThrowCompletionOr

This commit is contained in:
Linus Groh 2021-09-16 18:09:52 +01:00
commit 6b4777c558
Notes: sideshowbarker 2024-07-18 03:48:12 +09:00
10 changed files with 22 additions and 49 deletions

View file

@ -103,9 +103,7 @@ ThrowCompletionOr<PlainMonthDay*> to_temporal_month_day(GlobalObject& global_obj
return throw_completion(exception->value());
// e. Let fields be ? PrepareTemporalFields(item, fieldNames, «»).
auto* fields = prepare_temporal_fields(global_object, item_object, field_names, {});
if (auto* exception = vm.exception())
return throw_completion(exception->value());
auto* fields = TRY(prepare_temporal_fields(global_object, item_object, field_names, {}));
// f. Let month be ? Get(fields, "month").
auto month = fields->get(vm.names.month);