Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: df250e04fa34c4f1d4c1220cc7ed5def2ff53912
      
https://github.com/WebKit/WebKit/commit/df250e04fa34c4f1d4c1220cc7ed5def2ff53912
  Author: Sosuke Suzuki <[email protected]>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M JSTests/stress/temporal-instant.js
    M Source/JavaScriptCore/runtime/ISO8601.h

  Log Message:
  -----------
  [JSC] Fix error message of `Temporal.Instant.fromEpochMilliseconds`
https://bugs.webkit.org/show_bug.cgi?id=278440

Reviewed by Yusuke Suzuki.

In the current JSC, the `RangeError` message is corrupted when an invalid value 
is passed to
`Temporal.Instant.fromEpochMilliseconds`.

For example, `Temporal.Instant.fromEpochMilliseconds(86400_0000_0000_001)` 
throws a `RangeError`
with the message `56545248484848484848484848484849484848484848 epoch 
nanoseconds is outside of
supported range for Temporal.Instant`. This is clearly broken.

This patch fixes the `asString` method of `ISO8601::ExactTime`, ensuring that a 
correct `RangeError`
message is thrown.

* JSTests/stress/temporal-instant.js:
(forEach):
* Source/JavaScriptCore/runtime/ISO8601.h:

Canonical link: https://commits.webkit.org/282587@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to