Bug 159289

Summary: [JSC] Date.setYear() misses timeClip()
Product: WebKit Reporter: Benjamin Poulain <benjamin>
Component: New BugsAssignee: Benjamin Poulain <benjamin>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, joepeck, keith_miller, mark.lam, msaboff, saam
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Benjamin Poulain 2016-06-29 18:49:26 PDT
[JSC] Date.setYear() misses timeClip()
Comment 1 Benjamin Poulain 2016-06-29 18:51:08 PDT
Created attachment 282405 [details]
Patch
Comment 2 Geoffrey Garen 2016-06-30 09:48:39 PDT
Comment on attachment 282405 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2016-06-30 10:17:04 PDT
Comment on attachment 282405 [details]
Patch

Clearing flags on attachment: 282405

Committed r202683: <http://trac.webkit.org/changeset/202683>
Comment 4 WebKit Commit Bot 2016-06-30 10:17:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Joseph Pecoraro 2016-07-18 19:46:42 PDT
Comment on attachment 282405 [details]
Patch

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

> LayoutTests/js/date-timeClip-large-values-expected.txt:56
> +FAIL new Date(0).setYear(1.79769e+308).valueOf() should be NaN. Was -62135596800000.
> +FAIL new Date(0).setYear(-1.79769e+308).valueOf() should be NaN. Was -62135596800000.

These tests FAIL. Is that expected?
Comment 6 Benjamin Poulain 2016-07-18 19:47:58 PDT
(In reply to comment #5)
> Comment on attachment 282405 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=282405&action=review
> 
> > LayoutTests/js/date-timeClip-large-values-expected.txt:56
> > +FAIL new Date(0).setYear(1.79769e+308).valueOf() should be NaN. Was -62135596800000.
> > +FAIL new Date(0).setYear(-1.79769e+308).valueOf() should be NaN. Was -62135596800000.
> 
> These tests FAIL. Is that expected?

Yep. It's part of a much bigger bug: GregorianDateTime cannot handle big values.