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

Fix handling of overflow returns to BalancePossiblyInfiniteDurationRelative #2710

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

12wrigja
Copy link
Contributor

The current spec for BalancePossiblyInfinteTimeDurationRelative includes early-returning the overflow values, but this is not present in the polyfill code.

This seems to have been introduced in 0547d29.

@12wrigja 12wrigja changed the title Normative: Fix handling of overflow returns to BalancePossiblyInfiniteDurationRelative Fix handling of overflow returns to BalancePossiblyInfiniteDurationRelative Oct 13, 2023
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (3f82e8d) 96.33% compared to head (aa90e83) 96.30%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2710      +/-   ##
==========================================
- Coverage   96.33%   96.30%   -0.03%     
==========================================
  Files          20       20              
  Lines       12211    12205       -6     
  Branches     2274     2276       +2     
==========================================
- Hits        11763    11754       -9     
- Misses        390      393       +3     
  Partials       58       58              
Files Coverage Δ
polyfill/lib/ecmascript.mjs 98.49% <40.00%> (-0.06%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ptomato ptomato left a comment

Choose a reason for hiding this comment

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

Thanks for spotting this, it's correct.

Normally I would try to add a test262 test, since apparently this is a coverage gap. But in #2612, hopefully landing soon, we are removing the possibility for a duration to overflow in this function (because you just won't be able to construct durations that could overflow here.) So I think in this case it's not necessary.

@ptomato ptomato merged commit 1e9a372 into tc39:main Oct 16, 2023
9 checks passed
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.

2 participants