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.
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
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
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
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
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 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 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 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
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
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
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
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.");
2018-10-25 17:30 PDT, Sihui Liu
2018-10-25 18:30 PDT, EWS Watchlist
2018-10-25 18:40 PDT, EWS Watchlist
2018-10-25 19:21 PDT, EWS Watchlist
2018-10-25 19:25 PDT, EWS Watchlist
2018-10-25 20:57 PDT, EWS Watchlist
2018-10-26 11:28 PDT, Sihui Liu
2018-10-26 13:07 PDT, EWS Watchlist
2018-10-26 23:08 PDT, Sihui Liu
2018-10-27 00:43 PDT, EWS Watchlist
2018-10-29 16:36 PDT, Sihui Liu
2018-10-29 17:33 PDT, EWS Watchlist
2018-10-29 17:37 PDT, EWS Watchlist
2018-10-29 18:32 PDT, EWS Watchlist
2018-10-29 18:38 PDT, EWS Watchlist
2018-10-29 18:50 PDT, Sihui Liu
2018-10-30 09:34 PDT, Sihui Liu