Skip to content

Temporal: Prevent arbitrary loops in NormalizedTimeDurationToDays#3999

Merged
ptomato merged 1 commit intotc39:mainfrom
ptomato:temporal-2612-duration-loops
Feb 2, 2024
Merged

Temporal: Prevent arbitrary loops in NormalizedTimeDurationToDays#3999
ptomato merged 1 commit intotc39:mainfrom
ptomato:temporal-2612-duration-loops

Conversation

@ptomato
Copy link
Copy Markdown
Contributor

@ptomato ptomato commented Feb 1, 2024

Adapts the tests that checked arbitrarily long loops, to now check that an exception is thrown if the loop would happen.

Also updates some step numbers in related tests.

Tests accompany the already-approved normative change tc39/proposal-temporal#2612

@ptomato ptomato requested a review from a team as a code owner February 1, 2024 01:39
Adapts the tests that checked arbitrarily long loops, to now check that an
exception is thrown if the loop would happen.

Adds tests that exercise the newly added checks on return values of
getPossibleInstantsFor and getOffsetNanosecondsFor that limit UTC offset
shifts to 24 hours or less.

Also updates some step numbers in related tests.
Copy link
Copy Markdown
Contributor

@Aditi-1400 Aditi-1400 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Copy Markdown
Contributor

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@ptomato ptomato merged commit 3e7938c into tc39:main Feb 2, 2024
@ptomato ptomato deleted the temporal-2612-duration-loops branch February 2, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants