mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 06:07:34 +00:00
LibJS: Update Temporal RoundDuration AO to some spec changes
This commit effectively just does a bulk update of this function to the spec. Since there have been so many spec changes, no specific change was made in mind, and many FIXMEs have been left for where we are still out of date. These changes also appear to include a normative change to the temporal spec which was previously resulting in timeouts for some tests, and is now resulting in a timeout. Furthermore, this also resolves some crashes by protecting against division by zero, instead throwing a RangeError. This can only happen when a custom calender is provided which returns funky values. See: https://github.com/tc39/proposal-temporal/commit/ed85e9 Diff Tests: +8 ✅ -4 💀 -4 💥️
This commit is contained in:
parent
83b84cf0bd
commit
a7316d3641
4 changed files with 283 additions and 273 deletions
|
@ -107,7 +107,7 @@ struct MoveRelativeDateResult {
|
|||
// Used by RoundDuration to temporarily hold values
|
||||
struct RoundedDuration {
|
||||
DurationRecord duration_record;
|
||||
double remainder;
|
||||
double total;
|
||||
};
|
||||
|
||||
// Table 8: Duration Record Fields, https://tc39.es/proposal-temporal/#table-temporal-duration-record-fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue