[webkit-reviews] review granted: [Bug 190917] IndexedDB: iteration of cursors skip records if updated or deleted : [Attachment 353343] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Oct 30 09:05:51 PDT 2018
Chris Dumez <cdumez at apple.com> has granted Sihui Liu <sihui_liu at apple.com>'s
request for review:
Bug 190917: IndexedDB: iteration of cursors skip records if updated or deleted
https://bugs.webkit.org/show_bug.cgi?id=190917
Attachment 353343: Patch
https://bugs.webkit.org/attachment.cgi?id=353343&action=review
--- Comment #30 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 353343
--> https://bugs.webkit.org/attachment.cgi?id=353343
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.");
More information about the webkit-reviews
mailing list