Changeset 15321 in webkit for trunk/JavaScriptCore/kjs/value.cpp
- Timestamp:
- Jul 10, 2006, 8:16:41 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/value.cpp
r15155 r15321 56 56 } 57 57 58 int32_t JSValue::toInt32(ExecState *exec) const58 int32_t JSValue::toInt32(ExecState* exec, bool& ok) const 59 59 { 60 ok = true; 61 60 62 uint32_t i; 61 63 if (getUInt32(i)) … … 63 65 64 66 double d = roundValue(exec, const_cast<JSValue*>(this)); 65 if (isNaN(d) || isInf(d)) 67 if (isNaN(d) || isInf(d)) { 68 ok = false; 66 69 return 0; 70 } 67 71 double d32 = fmod(d, D32); 68 72
Note:
See TracChangeset
for help on using the changeset viewer.