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
Normative: Consistently check overflow options #2225
Conversation
In the fast paths for Temporal objects in ToTemporalDate and ToTemporalDateTime, the overflow option should be validated (even though it isn't used.) We do this for property bags and also for the case where we call Temporal.PlainDate.from(plainDate) and Temporal.PlainDateTime.from(plainDateTime), so it should be consistent. The status quo wasn't the result of any decision, it was an oversight. Closes: #2220
Draft until presented at TC39. |
Codecov Report
@@ Coverage Diff @@
## main #2225 +/- ##
==========================================
+ Coverage 82.10% 91.16% +9.06%
==========================================
Files 17 19 +2
Lines 10505 10528 +23
Branches 1468 1688 +220
==========================================
+ Hits 8625 9598 +973
+ Misses 1838 918 -920
+ Partials 42 12 -30
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
A normative change that reached consensus at the June 2022 TC39 meeting was this small change to throw on an invalid value for the overflow option in PlainDate.from() and PlainDateTime.from(), in the case of a fast-path conversion. See tc39/proposal-temporal#2225
This gained consensus at the June 2022 TC39 plenary meeting. Tests are in tc39/test262#3595 |
A normative change that reached consensus at the June 2022 TC39 meeting was this small change to throw on an invalid value for the overflow option in PlainDate.from() and PlainDateTime.from(), in the case of a fast-path conversion. See tc39/proposal-temporal#2225
tc39/proposal-temporal#2225 Call ToTemporalOverflow in ToTemporalDate and ToTemporalDateTime Spec Text: https://tc39.es/proposal-temporal/#sec-temporal-totemporaldate https://tc39.es/proposal-temporal/#sec-temporal-totemporaldatetime Bug: v8:11544 Change-Id: I3d2846e2efc214ea5385be58cb49e319369b5900 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3855705 Reviewed-by: Shu-yu Guo <syg@chromium.org> Commit-Queue: Frank Tang <ftang@chromium.org> Cr-Commit-Position: refs/heads/main@{#82797}
In the fast paths for Temporal objects in ToTemporalDate and
ToTemporalDateTime, the overflow option should be validated (even though
it isn't used.) We do this for property bags and also for the case where
we call Temporal.PlainDate.from(plainDate) and
Temporal.PlainDateTime.from(plainDateTime), so it should be consistent.
The status quo wasn't the result of any decision, it was an oversight.
Closes: #2220