Changeset 201586 in webkit
- Timestamp:
- Jun 1, 2016, 8:34:31 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/js/date-timeClip-large-values-expected.txt (added)
-
LayoutTests/js/date-timeClip-large-values.html (added)
-
LayoutTests/js/script-tests/date-timeClip-large-values.js (added)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/DatePrototype.cpp (modified) (2 diffs)
-
Source/WTF/ChangeLog (modified) (1 diff)
-
Source/WTF/wtf/DateMath.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r201568 r201586 1 2016-06-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] Some setters for components of Date do not timeClip() their result 4 https://bugs.webkit.org/show_bug.cgi?id=158278 5 rdar://problem/25131426 6 7 Reviewed by Geoffrey Garen. 8 9 New test coverage for large values. 10 11 Note that some of those tests are still failing with this patch. 12 13 The reason is our code handling month and years is unable to deal 14 with values outside int32. 15 Changing that is a bit more complicated due to the number of users 16 of DateMath. I leave that for the future. 17 18 * js/date-timeClip-large-values-expected.txt: Added. 19 * js/date-timeClip-large-values.html: Added. 20 * js/script-tests/date-timeClip-large-values.js: Added. 21 1 22 2016-06-01 Chris Fleizach <cfleizach@apple.com> 2 23 -
trunk/Source/JavaScriptCore/ChangeLog
r201584 r201586 1 2016-06-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] Some setters for components of Date do not timeClip() their result 4 https://bugs.webkit.org/show_bug.cgi?id=158278 5 rdar://problem/25131426 6 7 Reviewed by Geoffrey Garen. 8 9 Many of the setters where not doing timeClip() on the computed UTC 10 time since Epoch. 11 12 See http://www.ecma-international.org/ecma-262/6.0/#sec-date.prototype.setdate 13 and the following sections for the definition. 14 15 * runtime/DatePrototype.cpp: 16 (JSC::setNewValueFromTimeArgs): 17 (JSC::setNewValueFromDateArgs): 18 1 19 2016-06-01 Keith Miller <keith_miller@apple.com> 2 20 -
trunk/Source/JavaScriptCore/runtime/DatePrototype.cpp
r201448 r201586 919 919 return JSValue::encode(result); 920 920 } 921 922 JSValue result = jsNumber(gregorianDateTimeToMS(vm, gregorianDateTime, ms, inputTimeType)); 921 922 double newUTCDate = gregorianDateTimeToMS(vm, gregorianDateTime, ms, inputTimeType); 923 JSValue result = jsNumber(timeClip(newUTCDate)); 923 924 thisDateObj->setInternalValue(vm, result); 924 925 return JSValue::encode(result); … … 960 961 return JSValue::encode(result); 961 962 } 962 963 JSValue result = jsNumber(gregorianDateTimeToMS(vm, gregorianDateTime, ms, inputTimeType)); 963 964 double newUTCDate = gregorianDateTimeToMS(vm, gregorianDateTime, ms, inputTimeType); 965 JSValue result = jsNumber(timeClip(newUTCDate)); 964 966 thisDateObj->setInternalValue(vm, result); 965 967 return JSValue::encode(result); -
trunk/Source/WTF/ChangeLog
r201532 r201586 1 2016-06-01 Benjamin Poulain <bpoulain@apple.com> 2 3 [JSC] Some setters for components of Date do not timeClip() their result 4 https://bugs.webkit.org/show_bug.cgi?id=158278 5 6 Unreviewed. 7 8 * wtf/DateMath.cpp: 9 (WTF::equivalentYearForDST): Deleted. 10 The assertion is bogus. 11 As the comments above explains, the function is completely wrong for years 12 outside [1900-2100]. 13 The tests passing large values for years are failing (year <= maxYear). 14 The weird NaN test is a mystery. The old changelog does not explain it. 15 1 16 2016-05-31 Commit Queue <commit-queue@webkit.org> 2 17 -
trunk/Source/WTF/wtf/DateMath.cpp
r181360 r201586 358 358 359 359 year += product; 360 ASSERT((year >= minYear && year <= maxYear) || (product - year == static_cast<int>(std::numeric_limits<double>::quiet_NaN())));361 360 return year; 362 361 }
Note:
See TracChangeset
for help on using the changeset viewer.