Bug 303163
| Summary: | [JSC] Remove redundant `isValidISODate` check in `TemporalCalendar` | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sosuke Suzuki <aosukeke> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Sosuke Suzuki
The `isValidISODate` check after `regulateISODate` is redundant because:
- When overflow is `Reject`, `regulateISODate` already calls `isValidISODate`
and returns `std::nullopt` if invalid.
- When overflow is `Constrain`, the month and day are clamped to valid ranges,
so `isValidISODate` will always return true.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Sosuke Suzuki
Pull request: https://github.com/WebKit/WebKit/pull/54505
EWS
Committed 303878@main (a1e2020dffa2): <https://commits.webkit.org/303878@main>
Reviewed commits have been landed. Closing PR #54505 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/165805788>