Changeset 85844 in webkit
- Timestamp:
- May 5, 2011 1:36:27 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85839 r85844 1 2011-05-03 Hans Wennborg <hans@chromium.org> 2 3 Reviewed by Steve Block. 4 5 IndexedDB: Unit tests for LevelDB key coding functions 6 https://bugs.webkit.org/show_bug.cgi?id=59692 7 8 Fix some embarrassing bugs uncovered by unit tests. 9 10 No new functionality, but this is now covered by unit tests in the Chromium WebKit port. 11 12 * storage/IDBLevelDBCoding.cpp: 13 (WebCore::IDBLevelDBCoding::decodeInt): 14 (WebCore::IDBLevelDBCoding::decodeVarInt): 15 1 16 2011-05-05 Young Han Lee <joybro@company100.net> 2 17 -
trunk/Source/WebCore/storage/IDBLevelDBCoding.cpp
r85045 r85844 190 190 int64_t ret = 0; 191 191 192 int shift = 0; 192 193 while (begin < end) { 193 194 unsigned char c = *begin++; 194 ret = (ret << 8) | c; 195 ret |= static_cast<int64_t>(c) << shift; 196 shift += 8; 195 197 } 196 198 … … 206 208 n >>= 7; 207 209 if (n) 208 c |= 128;210 c |= 0x80; 209 211 ret.append(c); 210 212 } while (n); … … 217 219 ASSERT(limit >= p); 218 220 foundInt = 0; 221 int shift = 0; 219 222 220 223 do { … … 222 225 return 0; 223 226 224 foundInt = (foundInt << 7) | (*p & 0x7f); 225 } while (*p++ & 128); 227 unsigned char c = *p; 228 foundInt |= static_cast<int64_t>(c & 0x7f) << shift; 229 shift += 7; 230 } while (*p++ & 0x80); 226 231 return p; 227 232 } -
trunk/Source/WebKit/chromium/ChangeLog
r85833 r85844 1 2011-05-03 Hans Wennborg <hans@chromium.org> 2 3 Reviewed by Steve Block. 4 5 IndexedDB: Unit tests for LevelDB key coding functions 6 https://bugs.webkit.org/show_bug.cgi?id=59692 7 8 Add unit tests for the basic key coding functions used by the LevelDB back-end. 9 10 * WebKit.gypi: 11 * tests/IDBLevelDBCodingTest.cpp: Added. 12 (IDBLevelDBCoding::TEST): 13 1 14 2011-05-04 MORITA Hajime <morrita@google.com> 2 15 -
trunk/Source/WebKit/chromium/WebKit.gypi
r85244 r85844 58 58 'tests/IDBBindingUtilitiesTest.cpp', 59 59 'tests/IDBKeyPathTest.cpp', 60 'tests/IDBLevelDBCodingTest.cpp', 60 61 'tests/KeyboardTest.cpp', 61 62 'tests/KURLTest.cpp',
Note: See TracChangeset
for help on using the changeset viewer.