Changeset 39882 in webkit
- Timestamp:
- Jan 13, 2009 5:44:28 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r39879 r39882 1 2009-01-13 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Darin Adler and Oliver Hunt. 4 5 <rdar://problem/6489314> REGRESSION: Business widget's front side 6 fails to render correctly when flipping widget 7 8 The problem here is that parseInt was parsing NaN as 0. This patch 9 corrects that by parsing NaN as NaN. This matches our old behavior 10 and Firefox. 11 12 * runtime/JSGlobalObjectFunctions.cpp: 13 (JSC::globalFuncParseInt): 14 1 15 2009-01-13 Gavin Barraclough <barraclough@apple.com> 2 16 -
trunk/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
r39851 r39882 303 303 return value; 304 304 double d = value->uncheckedGetNumber(); 305 if (!isfinite(d)) 306 return js0(); 307 return jsNumber(exec, floor(d)); 305 if (isfinite(d)) 306 return jsNumber(exec, floor(d)); 307 if (isnan(d)) 308 return jsNaN(&exec->globalData()); 309 return js0(); 308 310 } 309 311 -
trunk/LayoutTests/ChangeLog
r39877 r39882 1 2009-01-13 Beth Dakin <bdakin@apple.com> 2 3 Reviewed by Darin Adler and Oliver Hunt. 4 5 Updated test and results for <rdar://problem/6489314> REGRESSION: 6 Business widget's front side fails to render correctly when 7 flipping widget 8 9 parseInt(NaN) should be NaN. 10 * fast/js/numeric-conversion-expected.txt: 11 * fast/js/resources/numeric-conversion.js: 12 1 13 2009-01-13 Anders Carlsson <andersca@apple.com> 2 14 -
trunk/LayoutTests/fast/js/numeric-conversion-expected.txt
r36434 r39882 18 18 PASS parseInt('9007199254740992e2000').toString() is '9007199254740992' 19 19 PASS parseInt('9007199254740992.0e2000').toString() is '9007199254740992' 20 PASS parseInt(NaN) is 020 PASS parseInt(NaN) is NaN 21 21 PASS parseInt(-Infinity) is 0 22 22 PASS parseInt(Infinity) is 0 -
trunk/LayoutTests/fast/js/resources/numeric-conversion.js
r36434 r39882 23 23 shouldBe("parseInt('9007199254740992.0e2000').toString()", "'9007199254740992'"); 24 24 25 shouldBe("parseInt(NaN)", " 0");25 shouldBe("parseInt(NaN)", "NaN"); 26 26 shouldBe("parseInt(-Infinity)", "0"); 27 27 shouldBe("parseInt(Infinity)", "0");
Note: See TracChangeset
for help on using the changeset viewer.