Changeset 26912 in webkit for trunk/JavaScriptCore/kjs/value.cpp
- Timestamp:
- Oct 22, 2007, 11:44:27 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/value.cpp
r26892 r26912 41 41 } 42 42 43 bool JSCell::get Int32(int32_t&) const43 bool JSCell::getUInt32(uint32_t&) const 44 44 { 45 45 return false; 46 46 } 47 47 48 bool JSCell::getUInt32(uint32_t&) const 48 bool JSCell::getTruncatedInt32(int32_t&) const 49 { 50 return false; 51 } 52 53 bool JSCell::getTruncatedUInt32(uint32_t&) const 49 54 { 50 55 return false; … … 54 59 double JSValue::toInteger(ExecState *exec) const 55 60 { 56 uint32_t i;57 if (get UInt32(i))61 int32_t i; 62 if (getTruncatedInt32(i)) 58 63 return i; 59 64 return roundValue(exec, const_cast<JSValue*>(this)); … … 63 68 { 64 69 ok = true; 65 66 int32_t i;67 if (getInt32(i))68 return i;69 70 70 71 double d = roundValue(exec, const_cast<JSValue*>(this)); … … 90 91 ok = true; 91 92 92 uint32_t i;93 if (getUInt32(i))94 return i;95 96 93 double d = roundValue(exec, const_cast<JSValue*>(this)); 97 94 if (d >= 0.0 && d < D32) … … 113 110 { 114 111 uint32_t i; 115 if (get UInt32(i))112 if (getTruncatedUInt32(i)) 116 113 return static_cast<uint16_t>(i); 117 114
Note:
See TracChangeset
for help on using the changeset viewer.