mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 11:21:34 +00:00
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:
parent
021a5f4ded
commit
521638642f
Notes:
github-actions[bot]
2024-11-23 13:47:20 +00:00
Author: https://github.com/trflynn89
Commit: 521638642f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2513
Reviewed-by: https://github.com/shannonbooth ✅
6 changed files with 15 additions and 15 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue