Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporal: Prevent arbitrary loops in NormalizedTimeDurationToDays #3999

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

ptomato
Copy link
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

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
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
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
9 checks passed
@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