If we update or delete a record using cursor, when the cursor continues, it would skip records with same key value. w3c test: w3c/web-platform-tests/blob/master/IndexedDB/idbcursor-iterating-update.htm.
<rdar://problem/35250410>
Created attachment 353133 [details] Patch
Comment on attachment 353133 [details] Patch Attachment 353133 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9732484 New failing tests: imported/w3c/web-platform-tests/IndexedDB/idbcursor-iterating-update.htm
Created attachment 353137 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 353133 [details] Patch Attachment 353133 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9732516 New failing tests: imported/w3c/web-platform-tests/IndexedDB/idbcursor-iterating-update.htm
Created attachment 353139 [details] Archive of layout-test-results from ews104 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 353133 [details] Patch Attachment 353133 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/9732594 New failing tests: imported/w3c/web-platform-tests/IndexedDB/idbcursor-iterating-update.htm
Created attachment 353143 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 353133 [details] Patch Attachment 353133 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/9732938 New failing tests: storage/indexeddb/cursor-added-bug.html storage/indexeddb/modern/index-cursor-3.html
Created attachment 353144 [details] Archive of layout-test-results from ews204 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews204 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Comment on attachment 353133 [details] Patch Attachment 353133 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9733348 New failing tests: imported/w3c/web-platform-tests/IndexedDB/idbcursor-iterating-update.htm
Created attachment 353152 [details] Archive of layout-test-results from ews112 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-sierra Platform: Mac OS X 10.12.6
Created attachment 353194 [details] Patch
Comment on attachment 353194 [details] Patch Attachment 353194 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/9742110 New failing tests: storage/indexeddb/cursor-added-bug.html storage/indexeddb/modern/index-cursor-3.html
Created attachment 353205 [details] Archive of layout-test-results from ews201 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews201 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Comment on attachment 353194 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353194&action=review > Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp:219 > + fetch(true); We like to use enum classes for parameters like this so that it looks obvious from the call site what the parameter means: enum class shouldFetchForSameKey : bool { No, Yes };
Created attachment 353223 [details] Patch
Comment on attachment 353223 [details] Patch Attachment 353223 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/9746753 New failing tests: storage/indexeddb/cursor-added-bug.html storage/indexeddb/cursor-update-while-iterating.html
Created attachment 353226 [details] Archive of layout-test-results from ews204 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews204 Port: win-future Platform: CYGWIN_NT-6.1-2.10.0-0.325-5-3-x86_64-64bit
Created attachment 353332 [details] Patch
Comment on attachment 353332 [details] Patch Attachment 353332 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9773423 New failing tests: storage/indexeddb/cursor-update-while-iterating.html
Created attachment 353336 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 353332 [details] Patch Attachment 353332 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9773475 New failing tests: storage/indexeddb/cursor-update-while-iterating.html
Created attachment 353337 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 353332 [details] Patch Attachment 353332 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9773547 New failing tests: storage/indexeddb/cursor-update-while-iterating.html
Created attachment 353339 [details] Archive of layout-test-results from ews112 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews112 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 353332 [details] Patch Attachment 353332 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/9773558 New failing tests: storage/indexeddb/cursor-update-while-iterating.html
Created attachment 353342 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 353343 [details] Patch
Comment on attachment 353343 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=353343&action=review r=me with comments > LayoutTests/storage/indexeddb/resources/cursor-update-while-iterating.js:10 > +objectArray = [ const objectArray ? > LayoutTests/storage/indexeddb/resources/cursor-update-while-iterating.js:19 > + for (var i = 0; i < objectArray.length; i ++) No space between i and ++. In this case though, I think the loop for look better like so: for (let object of objectArray) objectStore.add(object).onerror = unexpectedErrorCallback; > LayoutTests/storage/indexeddb/resources/cursor-update-while-iterating.js:39 > + trans = evalAndLog("trans = db.transaction('objectStore', 'readwrite')"); Let's call it transaction or t, 'trans' looks weird. > LayoutTests/storage/indexeddb/resources/cursor-update-while-iterating.js:65 > + debug("FAIL: cursor didn't go through whole array."); testFailed("Cursor didn't go through whole array."); > LayoutTests/storage/indexeddb/resources/cursor-update-while-iterating.js:67 > + debug("Successfully iterated whole array with cursor updates.") testPassed("Successfully iterated whole array with cursor updates.");
Created attachment 353375 [details] Patch for landing
Comment on attachment 353375 [details] Patch for landing Clearing flags on attachment: 353375 Committed r237590: <https://trac.webkit.org/changeset/237590>
All reviewed patches have been landed. Closing bug.