LibJS: Capture CalendarFields by reference in Calendar*FromFields AOs

These fields are modified by an invocation to CalendarResolveFields. All
callers currently don't care about these modifications, so they move the
CalendarFields struct into the AO. But it turns out that at least one AO
will care (InterpretTemporalDateTimeFields), thus we will need to take
by reference here.
This commit is contained in:
Timothy Flynn 2024-11-22 16:55:18 -05:00 committed by Andreas Kling
commit 521638642f
Notes: github-actions[bot] 2024-11-23 13:47:20 +00:00
6 changed files with 15 additions and 15 deletions

View file

@ -106,7 +106,7 @@ ThrowCompletionOr<GC::Ref<PlainDate>> to_temporal_date(VM& vm, Value item, Value
auto overflow = TRY(get_temporal_overflow_option(vm, resolved_options));
// h. Let isoDate be ? CalendarDateFromFields(calendar, fields, overflow).
auto iso_date = TRY(calendar_date_from_fields(vm, calendar, move(fields), overflow));
auto iso_date = TRY(calendar_date_from_fields(vm, calendar, fields, overflow));
// i. Return ! CreateTemporalDate(isoDate, calendar).
return MUST(create_temporal_date(vm, iso_date, move(calendar)));