Bug 236936

Summary: [JSC] Temporal.PlainDate should validate input range
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, darin, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch darin: review+

Description Yusuke Suzuki 2022-02-20 01:41:22 PST
[JSC] Temporal.PlainDate should validate input range
Comment 1 Yusuke Suzuki 2022-02-20 01:46:16 PST
Created attachment 452687 [details]
Patch
Comment 2 Darin Adler 2022-02-21 12:57:42 PST
Comment on attachment 452687 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452687&action=review

> JSTests/ChangeLog:3
> +        [JSC] Temporal.PlainDate should validate input range

I think we’d want the test for the last valid as well as the first invalid.
Comment 3 Yusuke Suzuki 2022-02-21 14:43:50 PST
Comment on attachment 452687 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452687&action=review

>> JSTests/ChangeLog:3
>> +        [JSC] Temporal.PlainDate should validate input range
> 
> I think we’d want the test for the last valid as well as the first invalid.

Sounds good, added.
Comment 4 Yusuke Suzuki 2022-02-21 14:44:26 PST
Created attachment 452776 [details]
Patch
Comment 5 Yusuke Suzuki 2022-02-21 14:54:48 PST
Created attachment 452778 [details]
Patch
Comment 6 Yusuke Suzuki 2022-02-21 15:09:27 PST
Created attachment 452781 [details]
Patch
Comment 7 Darin Adler 2022-02-21 16:58:25 PST
Comment on attachment 452781 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452781&action=review

review+ assuming the tests pass

> JSTests/stress/temporal-plaindate.js:114
> +new Temporal.PlainDate(0x43530, 9, 13);

Maybe a shouldBe about the string form?

> JSTests/stress/temporal-plaindate.js:116
> +new Temporal.PlainDate(-0x425cd, 4, 20);

Ditto.
Comment 8 Yusuke Suzuki 2022-02-21 18:07:50 PST
Comment on attachment 452781 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452781&action=review

Thank you!

>> JSTests/stress/temporal-plaindate.js:114
>> +new Temporal.PlainDate(0x43530, 9, 13);
> 
> Maybe a shouldBe about the string form?

Done.

>> JSTests/stress/temporal-plaindate.js:116
>> +new Temporal.PlainDate(-0x425cd, 4, 20);
> 
> Ditto.

Done.
Comment 9 Yusuke Suzuki 2022-02-21 18:12:32 PST
Committed r290282 (?): <https://commits.webkit.org/r290282>
Comment 10 Radar WebKit Bug Importer 2022-02-21 18:13:15 PST
<rdar://problem/89268246>