mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-11 02:29:21 +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
Notes:
sideshowbarker
2024-07-18 04:56:53 +09:00
Author: https://github.com/linusg
Commit: ed98c1afc7
Pull-request: https://github.com/SerenityOS/serenity/pull/9714
Reviewed-by: https://github.com/IdanHo ✅
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