Bug 4781 - Date.setMonth fails with big values due to overflow
Summary: Date.setMonth fails with big values due to overflow
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 412
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Geoffrey Garen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 14:38 PDT by Geoffrey Garen
Modified: 2005-09-07 16:25 PDT (History)
0 users

See Also:


Attachments
Fix (8.17 KB, patch)
2005-08-31 14:39 PDT, Geoffrey Garen
darin: review+
Details | Formatted Diff | Diff
fast/js/date-big-setmonth.html (845 bytes, text/html)
2005-09-07 16:15 PDT, Geoffrey Garen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Geoffrey Garen 2005-08-31 14:38:59 PDT
 
Comment 1 Geoffrey Garen 2005-08-31 14:39:25 PDT
Created attachment 3704 [details]
Fix

I still need to write a layout test for this.
Comment 2 Darin Adler 2005-09-03 12:12:21 PDT
Comment on attachment 3704 [details]
Fix

The "containsNaN" function seems like it will go past even the 7th argument,
which is probably not the desired behavior. You probably want a maxArgs
parameter to that function. Also, that change doesn't seem to be part of the
bug fix. So maybe you should land it separately.

The main bug fix looks fine, r=me on that. I'm going to set this to review+,
but it's really review+ on the first half ot he patch and review- on the second
half.
Comment 3 Geoffrey Garen 2005-09-07 16:15:37 PDT
Created attachment 3805 [details]
fast/js/date-big-setmonth.html

Layout test
Comment 4 Geoffrey Garen 2005-09-07 16:25:47 PDT
OK. I landed the setMonth change minus the containsNaN bit plus the layout test.