Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7160fd30c3a9a3b3c438193a539096dd10314332
https://github.com/WebKit/WebKit/commit/7160fd30c3a9a3b3c438193a539096dd10314332
Author: Keita Nonaka <[email protected]>
Date: 2025-05-29 (Thu, 29 May 2025)
Changed paths:
M JSTests/test262/expectations.yaml
M LayoutTests/js/date-timeClip-large-values-expected.txt
M Source/JavaScriptCore/runtime/DatePrototype.cpp
Log Message:
-----------
[JSC] Fix tc39 a test case for Date.prototype.setUTCFullYear
https://bugs.webkit.org/show_bug.cgi?id=290724
Reviewed by Sosuke Suzuki.
TimeClip[1] function, as referenced in Date.prototype.setUTCFullYear[2],
mentions that absolute value of time must not exceed 8.64E15 in milliseconds,
otherwise returns NaN. However, the current GregorianDateTime class represents
years member variable as int.
Therefore, if the years exceeds the maximum representable int,
date calculations may produce incorrect results.
This patch adds a safeguard to ensure that such overflows are prevented
to align the behavior with the TC39 spec.
[1]: https://tc39.es/ecma262/#sec-timeclip
[2]: https://tc39.es/ecma262/#sec-date.prototype.setutcfullyear
* JSTests/test262/expectations.yaml:
* LayoutTests/js/date-timeClip-large-values-expected.txt:
* Source/JavaScriptCore/runtime/DatePrototype.cpp:
(JSC::fillStructuresUsingDateArgs):
Canonical link: https://commits.webkit.org/295562@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