Changeset 18715 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jan 9, 2007, 9:38:46 AM (18 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r18712 r18715 1 2007-01-09 Mitz Pettel <[email protected]> 2 3 Reviewed by Darin. 4 5 - changes for http://bugs.webkit.org/show_bug.cgi?id=11078 6 Forms Don't Submit (ASP Pages) 7 8 * JavaScriptCore.exp: 9 * kjs/value.cpp: 10 (KJS::JSValue::toInt32): Folded toInt32Inline into this method, which was its 11 only caller. 12 (KJS::JSValue::toUInt32): Added a variant that reports if the conversion has 13 succeeded. 14 * kjs/value.h: 15 1 16 2007-01-09 Darin Adler <[email protected]> 2 17 -
trunk/JavaScriptCore/JavaScriptCore.exp
r18481 r18715 248 248 __ZNK3KJS7JSValue7toInt32EPNS_9ExecStateERb 249 249 __ZNK3KJS7JSValue8toUInt32EPNS_9ExecStateE 250 __ZNK3KJS7JSValue8toUInt32EPNS_9ExecStateERb 250 251 __ZNK3KJS7JSValue9toIntegerEPNS_9ExecStateE 251 252 __ZNK3KJS7UString10UTF8StringEv -
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 -
trunk/JavaScriptCore/kjs/value.h
r17372 r18715 95 95 96 96 // Integer conversions. 97 double toInteger(ExecState *exec) const;97 double toInteger(ExecState*) const; 98 98 int32_t toInt32(ExecState*) const; 99 99 int32_t toInt32(ExecState*, bool& ok) const; 100 uint32_t toUInt32(ExecState *exec) const; 101 uint16_t toUInt16(ExecState *exec) const; 100 uint32_t toUInt32(ExecState*) const; 101 uint32_t toUInt32(ExecState*, bool& ok) const; 102 uint16_t toUInt16(ExecState*) const; 102 103 103 104 // Garbage collection. … … 109 110 JSCell *downcast(); 110 111 const JSCell *downcast() const; 111 inline int32_t toInt32Inline(ExecState*, bool& ok) const;112 112 113 113 // Give a compile time error if we try to copy one of these.
Note:
See TracChangeset
for help on using the changeset viewer.