Skip to content

Commit

Permalink
Bug 1903963 - Part 2: Add missing valid date-time check to AddDate. r…
Browse files Browse the repository at this point in the history
…=spidermonkey-reviewers,dminor

tc39/proposal-temporal#2891

Depends on D214499

Differential Revision: https://phabricator.services.mozilla.com/D214500

UltraBlame original commit: 19219cc6f22aa322d6eda61a7400ac80e2fbbe7b
  • Loading branch information
marco-c committed Jul 1, 2024
1 parent 7e9925c commit 6169c30
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions js/src/builtin/temporal/PlainDate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5631,6 +5631,39 @@ balanced
)
)
;
/
/
Directly
validate
the
result
is
within
the
valid
limits
.
if
(
!
ISODateTimeWithinLimits
(
balanced
)
)
{
JS_ReportErrorNumberASCII
(
cx
GetErrorMessage
nullptr
JSMSG_TEMPORAL_PLAIN_DATE_INVALID
)
;
return
false
;
}
*
result
=
Expand Down

0 comments on commit 6169c30

Please sign in to comment.