Changeset 193657 in webkit
- Timestamp:
- Dec 7, 2015 3:07:03 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r193644 r193657 1 2015-12-07 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: storage/indexeddb/cursor-continue-validity.html fails. 4 https://bugs.webkit.org/show_bug.cgi?id=151961 5 6 Reviewed by Alex Christensen. 7 8 * platform/mac-wk1/TestExpectations: 9 * storage/indexeddb/cursor-finished-expected.txt: 10 1 11 2015-12-07 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 12 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r193643 r193657 111 111 storage/indexeddb/createIndex-after-failure.html [ Failure ] 112 112 storage/indexeddb/cursor-continue.html [ Failure ] 113 storage/indexeddb/cursor-continue-validity.html [ Failure ]114 113 storage/indexeddb/cursor-continueprimarykey.html [ Failure ] 115 114 storage/indexeddb/cursor-leak.html [ Failure ] -
trunk/LayoutTests/storage/indexeddb/cursor-finished-expected.txt
r193428 r193657 50 50 PASS code is DOMException.INVALID_STATE_ERR 51 51 PASS ename is 'InvalidStateError' 52 Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.52 Exception message: Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end. 53 53 Expecting exception from savedCursor.advance(1) 54 54 PASS Exception was thrown. … … 70 70 PASS code is DOMException.INVALID_STATE_ERR 71 71 PASS ename is 'InvalidStateError' 72 Exception message: An operation was called on an object on which it is not allowed or at a time when it is not allowed.72 Exception message: Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end. 73 73 74 74 PASS successfullyParsed is true -
trunk/Source/WebCore/ChangeLog
r193656 r193657 1 2015-12-07 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: storage/indexeddb/cursor-continue-validity.html fails. 4 https://bugs.webkit.org/show_bug.cgi?id=151961 5 6 Reviewed by Alex Christensen. 7 8 No new tests (At least one failing test now passes). 9 10 When an index cursor's iterator was invalidated, there were some cases where it did 11 not correctly find the next iterator to pick up where it left off. 12 13 * Modules/indexeddb/client/IDBCursorImpl.cpp: 14 (WebCore::IDBClient::IDBCursor::update): 15 (WebCore::IDBClient::IDBCursor::deleteFunction): 16 17 * Modules/indexeddb/server/IndexValueStore.cpp: 18 (WebCore::IDBServer::IndexValueStore::find): 19 (WebCore::IDBServer::IndexValueStore::loggingString): 20 * Modules/indexeddb/server/IndexValueStore.h: 21 1 22 2015-12-07 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp
r193428 r193657 134 134 if (!m_gotValue) { 135 135 ec.code = IDBDatabaseException::InvalidStateError; 136 ec.message = ASCIILiteral("Failed to execute 'update' on 'IDBCursor': The cursor is being iterated or has iterated past its end."); 136 137 return nullptr; 137 138 } … … 307 308 if (!m_gotValue) { 308 309 ec.code = IDBDatabaseException::InvalidStateError; 310 ec.message = ASCIILiteral("Failed to execute 'delete' on 'IDBCursor': The cursor is being iterated or has iterated past its end."); 309 311 return nullptr; 310 312 } -
trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp
r192948 r193657 213 213 ASSERT(record); 214 214 215 // If the main record iterator is not equal to the key we were looking for, 216 // we know the primary key record should be the first. 217 if (*iterator != key) { 218 auto primaryIterator = record->begin(); 219 ASSERT(primaryIterator.isValid()); 220 221 return { *this, iterator, primaryIterator }; 222 } 223 215 224 auto primaryIterator = record->find(primaryKey); 216 225 if (primaryIterator.isValid()) … … 375 384 } 376 385 386 #ifndef NDEBUG 387 String IndexValueStore::loggingString() const 388 { 389 String result; 390 for (auto& key : m_orderedKeys) { 391 result.append(makeString("Key: ", key.loggingString())); 392 result.append(makeString(" Entry has ", String::number(m_records.get(key)->getCount()), " entries")); 393 } 394 return result; 395 } 396 #endif 397 377 398 } // namespace IDBServer 378 399 } // namespace WebCore -
trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.h
r192847 r193657 99 99 Iterator reverseFind(const IDBKeyData&, const IDBKeyData& primaryKey, CursorDuplicity); 100 100 101 #ifndef NDEBUG 102 String loggingString() const; 103 #endif 104 101 105 private: 102 106 std::set<IDBKeyData>::iterator lowestIteratorInRange(const IDBKeyRangeData&) const;
Note: See TracChangeset
for help on using the changeset viewer.