WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
190917
IndexedDB: iteration of cursors skip records if updated or deleted
https://bugs.webkit.org/show_bug.cgi?id=190917
Summary
IndexedDB: iteration of cursors skip records if updated or deleted
Sihui Liu
Reported
2018-10-25 13:54:52 PDT
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.
Attachments
Patch
(10.20 KB, patch)
2018-10-25 17:30 PDT
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews102 for mac-sierra
(2.37 MB, application/zip)
2018-10-25 18:30 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews104 for mac-sierra-wk2
(2.93 MB, application/zip)
2018-10-25 18:40 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews125 for ios-simulator-wk2
(2.34 MB, application/zip)
2018-10-25 19:21 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews204 for win-future
(12.71 MB, application/zip)
2018-10-25 19:25 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews112 for mac-sierra
(3.37 MB, application/zip)
2018-10-25 20:57 PDT
,
EWS Watchlist
no flags
Details
Patch
(12.13 KB, patch)
2018-10-26 11:28 PDT
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews201 for win-future
(12.75 MB, application/zip)
2018-10-26 13:07 PDT
,
EWS Watchlist
no flags
Details
Patch
(17.18 KB, patch)
2018-10-26 23:08 PDT
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews204 for win-future
(12.81 MB, application/zip)
2018-10-27 00:43 PDT
,
EWS Watchlist
no flags
Details
Patch
(13.25 KB, patch)
2018-10-29 16:36 PDT
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Archive of layout-test-results from ews107 for mac-sierra-wk2
(3.36 MB, application/zip)
2018-10-29 17:33 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews102 for mac-sierra
(2.37 MB, application/zip)
2018-10-29 17:37 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews112 for mac-sierra
(3.06 MB, application/zip)
2018-10-29 18:32 PDT
,
EWS Watchlist
no flags
Details
Archive of layout-test-results from ews123 for ios-simulator-wk2
(2.31 MB, application/zip)
2018-10-29 18:38 PDT
,
EWS Watchlist
no flags
Details
Patch
(13.39 KB, patch)
2018-10-29 18:50 PDT
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Patch for landing
(13.29 KB, patch)
2018-10-30 09:34 PDT
,
Sihui Liu
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
Sihui Liu
Comment 1
2018-10-25 13:55:56 PDT
<
rdar://problem/35250410
>
Sihui Liu
Comment 2
2018-10-25 17:30:25 PDT
Created
attachment 353133
[details]
Patch
EWS Watchlist
Comment 3
2018-10-25 18:30:48 PDT
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
EWS Watchlist
Comment 4
2018-10-25 18:30:50 PDT
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
EWS Watchlist
Comment 5
2018-10-25 18:40:53 PDT
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
EWS Watchlist
Comment 6
2018-10-25 18:40:55 PDT
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
EWS Watchlist
Comment 7
2018-10-25 19:21:00 PDT
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
EWS Watchlist
Comment 8
2018-10-25 19:21:01 PDT
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
EWS Watchlist
Comment 9
2018-10-25 19:24:59 PDT
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
EWS Watchlist
Comment 10
2018-10-25 19:25:10 PDT
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
EWS Watchlist
Comment 11
2018-10-25 20:57:32 PDT
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
EWS Watchlist
Comment 12
2018-10-25 20:57:34 PDT
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
Sihui Liu
Comment 13
2018-10-26 11:28:09 PDT
Created
attachment 353194
[details]
Patch
EWS Watchlist
Comment 14
2018-10-26 13:07:45 PDT
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
EWS Watchlist
Comment 15
2018-10-26 13:07:56 PDT
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
Chris Dumez
Comment 16
2018-10-26 14:15:10 PDT
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 };
Sihui Liu
Comment 17
2018-10-26 23:08:30 PDT
Created
attachment 353223
[details]
Patch
EWS Watchlist
Comment 18
2018-10-27 00:43:23 PDT
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
EWS Watchlist
Comment 19
2018-10-27 00:43:35 PDT
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
Sihui Liu
Comment 20
2018-10-29 16:36:02 PDT
Created
attachment 353332
[details]
Patch
EWS Watchlist
Comment 21
2018-10-29 17:33:03 PDT
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
EWS Watchlist
Comment 22
2018-10-29 17:33:04 PDT
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
EWS Watchlist
Comment 23
2018-10-29 17:37:18 PDT
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
EWS Watchlist
Comment 24
2018-10-29 17:37:20 PDT
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
EWS Watchlist
Comment 25
2018-10-29 18:32:55 PDT
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
EWS Watchlist
Comment 26
2018-10-29 18:32:57 PDT
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
EWS Watchlist
Comment 27
2018-10-29 18:38:55 PDT
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
EWS Watchlist
Comment 28
2018-10-29 18:38:57 PDT
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
Sihui Liu
Comment 29
2018-10-29 18:50:38 PDT
Created
attachment 353343
[details]
Patch
Chris Dumez
Comment 30
2018-10-30 09:05:51 PDT
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.");
Sihui Liu
Comment 31
2018-10-30 09:34:32 PDT
Created
attachment 353375
[details]
Patch for landing
WebKit Commit Bot
Comment 32
2018-10-30 10:11:46 PDT
Comment on
attachment 353375
[details]
Patch for landing Clearing flags on attachment: 353375 Committed
r237590
: <
https://trac.webkit.org/changeset/237590
>
WebKit Commit Bot
Comment 33
2018-10-30 10:11:49 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug