[webkit-changes] [WebKit/WebKit] 51ee7e: [JSC] Disallow sub-minute in TimeZoneAnnotation
SUZUKI Sosuke
noreply at github.com
Sun Aug 25 02:03:11 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 51ee7ef9bdeeb5fb4fe9286bbfe7425f047b0b0f
https://github.com/WebKit/WebKit/commit/51ee7ef9bdeeb5fb4fe9286bbfe7425f047b0b0f
Author: Sosuke Suzuki <aosukeke at gmail.com>
Date: 2024-08-25 (Sun, 25 Aug 2024)
Changed paths:
M JSTests/stress/temporal-plaindate.js
M JSTests/stress/temporal-plaindatetime.js
M JSTests/stress/temporal-plaintime.js
M JSTests/test262/expectations.yaml
M Source/JavaScriptCore/runtime/ISO8601.cpp
M Source/JavaScriptCore/runtime/ISO8601.h
M Source/JavaScriptCore/runtime/TemporalTimeZone.cpp
M Source/JavaScriptCore/runtime/TemporalTimeZoneConstructor.cpp
Log Message:
-----------
[JSC] Disallow sub-minute in TimeZoneAnnotation
https://bugs.webkit.org/show_bug.cgi?id=278207
Reviewed by Yusuke Suzuki.
According to the latest specification of Temporal[1][2][3], sub-minute values cannot be written in
the UTCOffset of a TimeZoneAnnotation within an ISO8601 string.
However, in the current JSC, even if a sub-minute value is written in the TimeZoneAnnotation, no
RangeError is thrown.
This patch makes the following changes:
- In the UTCOffset of a TimeZoneAnnotation within an ISO8601 string, sub-minute values are no longer
parsed, and a RangeError will be thrown.
- Update relevant function names and comments in ISO8601.cpp/ISO8601.h to follow the latest
specification:
* Rename `parseTimeZoneNumericUTCOffset` to `parseUTCOffset` and update comments
* Rename `parseTimeZoneBracketedAnnotation` to `parseTimeZoneAnnotation` and update comments
[1]: https://tc39.es/proposal-temporal/#prod-TimeZoneAnnotation
[2]: https://tc39.es/proposal-temporal/#prod-TimeZoneIdentifier
[3]: https://tc39.es/proposal-temporal/#prod-UTCOffset
* JSTests/stress/temporal-plaindate.js:
* JSTests/stress/temporal-plaindatetime.js:
* JSTests/stress/temporal-plaintime.js:
* JSTests/test262/expectations.yaml:
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseTimeSpec):
(JSC::ISO8601::parseUTCOffset):
(JSC::ISO8601::parseTimeZoneAnnotation):
(JSC::ISO8601::parseTimeZone):
(JSC::ISO8601::parseTimeZoneNumericUTCOffset): Deleted.
(JSC::ISO8601::parseTimeZoneBracketedAnnotation): Deleted.
* Source/JavaScriptCore/runtime/ISO8601.h:
* Source/JavaScriptCore/runtime/TemporalTimeZone.cpp:
(JSC::TemporalTimeZone::from):
* Source/JavaScriptCore/runtime/TemporalTimeZoneConstructor.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
Canonical link: https://commits.webkit.org/282710@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list