Changeset 18715 in webkit for trunk/JavaScriptCore/kjs/value.cpp
- Timestamp:
- Jan 9, 2007, 9:38:46 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/value.cpp
r17372 r18715 56 56 } 57 57 58 inline int32_t JSValue::toInt32Inline(ExecState* exec, bool& ok) const 58 int32_t JSValue::toInt32(ExecState* exec) const 59 { 60 bool ok; 61 return toInt32(exec, ok); 62 } 63 64 int32_t JSValue::toInt32(ExecState* exec, bool& ok) const 59 65 { 60 66 ok = true; … … 79 85 } 80 86 81 int32_t JSValue::toInt32(ExecState* exec) const87 uint32_t JSValue::toUInt32(ExecState* exec) const 82 88 { 83 89 bool ok; 84 return to Int32(exec, ok);90 return toUInt32(exec, ok); 85 91 } 86 92 87 int32_t JSValue::toInt32(ExecState* exec, bool& ok) const93 uint32_t JSValue::toUInt32(ExecState* exec, bool& ok) const 88 94 { 89 return toInt32Inline(exec, ok); 90 } 95 ok = true; 91 96 92 uint32_t JSValue::toUInt32(ExecState *exec) const93 {94 97 uint32_t i; 95 98 if (getUInt32(i)) … … 97 100 98 101 double d = roundValue(exec, const_cast<JSValue*>(this)); 99 if (isNaN(d) || isInf(d)) 102 if (isNaN(d) || isInf(d)) { 103 ok = false; 100 104 return 0; 105 } 101 106 double d32 = fmod(d, D32); 102 107
Note:
See TracChangeset
for help on using the changeset viewer.