Changeset 30191 in webkit
- Timestamp:
- Feb 13, 2008 1:51:59 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r30177 r30191 1 2008-02-13 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Alexey P. 4 5 <rdar://problem/5737003> REGRESSION (r27747): can't browse pictures on fastcupid.com 6 7 When converting numeric values to booleans we need to account for NaN 8 9 * kjs/nodes.cpp: 10 (KJS::MultNode::evaluateToBoolean): 11 (KJS::ModNode::evaluateToBoolean): 12 1 13 2008-02-08 Samuel Weinig <sam@webkit.org> 2 14 -
trunk/JavaScriptCore/kjs/nodes.cpp
r30102 r30191 2136 2136 bool MultNode::evaluateToBoolean(ExecState* exec) 2137 2137 { 2138 return inlineEvaluateToNumber(exec); 2138 double result = inlineEvaluateToNumber(exec); 2139 return result > 0.0 || 0.0 > result; // NaN produces false as well 2139 2140 } 2140 2141 … … 2211 2212 bool ModNode::evaluateToBoolean(ExecState* exec) 2212 2213 { 2213 return inlineEvaluateToNumber(exec); 2214 double result = inlineEvaluateToNumber(exec); 2215 return result > 0.0 || 0.0 > result; // NaN produces false as well 2214 2216 } 2215 2217 -
trunk/LayoutTests/ChangeLog
r30176 r30191 1 2008-02-13 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Alexey P. 4 5 Tests for <rdar://problem/5737003> REGRESSION (r27747): can't browse pictures on fastcupid.com 6 7 Ensure that the basic arithmetic operands can correctly handle the NaN -> boolean conversion 8 9 * fast/js/convert-nan-to-bool.html: Added. 10 * fast/js/convert-nan-to-bool-expected.txt: Added. 11 * fast/js/resources/convert-nan-to-bool.js: Added. 12 1 13 2008-02-12 Dan Bernstein <mitz@apple.com> 2 14
Note: See TracChangeset
for help on using the changeset viewer.