mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 02:28:12 +00:00
LibJS: Mark a call of CreateDurationRecord as fallible
This is an editorial change in the Temporal spec.
See: 462f027
This commit is contained in:
parent
81b9a2e4a1
commit
3bc54ac75a
1 changed files with 2 additions and 2 deletions
|
@ -1504,8 +1504,8 @@ ThrowCompletionOr<RoundedDuration> round_duration(GlobalObject& global_object, d
|
|||
remainder -= nanoseconds;
|
||||
}
|
||||
|
||||
// 19. Let duration be ! CreateDurationRecord(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds).
|
||||
auto duration = create_duration_record(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds);
|
||||
// 19. Let duration be ? CreateDurationRecord(years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds).
|
||||
auto duration = TRY(create_duration_record(global_object, years, months, weeks, days, hours, minutes, seconds, milliseconds, microseconds, nanoseconds));
|
||||
|
||||
// 20. Return the Record { [[DurationRecord]]: duration, [[Remainder]]: remainder }.
|
||||
return RoundedDuration { .duration_record = duration, .remainder = remainder };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue