mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:48:11 +00:00
LibJS: Throw RangeError in PrepareTemporalFields for +/-∞
This is a normative change in the Temporal spec.
See: 499282a
This commit is contained in:
parent
e845e7c814
commit
ed98c1afc7
5 changed files with 25 additions and 32 deletions
|
@ -351,8 +351,8 @@ Optional<UnregulatedTemporalTime> to_temporal_time_record(GlobalObject& global_o
|
|||
return {};
|
||||
}
|
||||
|
||||
// d. Set value to ? ToIntegerOrInfinity(value).
|
||||
auto value_number = value.to_integer_or_infinity(global_object);
|
||||
// d. Set value to ? ToIntegerThrowOnInfinity(value).
|
||||
auto value_number = to_integer_throw_on_infinity(global_object, value, ErrorType::TemporalPropertyMustBeFinite);
|
||||
if (vm.exception())
|
||||
return {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue