WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 53690
IndexedDB: Cursors should skip deleted entries
https://bugs.webkit.org/show_bug.cgi?id=53690
Summary
IndexedDB: Cursors should skip deleted entries
Hans Wennborg
Reported
2011-02-03 10:05:09 PST
IndexedDB: Cursors should skip deleted entries
Attachments
Patch
(11.46 KB, patch)
2011-02-03 10:07 PST
,
Hans Wennborg
no flags
Details
Formatted Diff
Diff
Patch
(14.23 KB, patch)
2011-02-04 09:04 PST
,
Hans Wennborg
jorlow
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Hans Wennborg
Comment 1
2011-02-03 10:07:54 PST
Created
attachment 81073
[details]
Patch
Jeremy Orlow
Comment 2
2011-02-03 14:45:43 PST
Comment on
attachment 81073
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=81073&action=review
Maybe you should make your test function a bit more generic and then you can specifically test more corner cases: the first element, the last, the current, the previous, a couple previous, the next, and a couple later. (The last is all you test now.) I don't think it'll take too much time and it'll definitely make this more robust in the future. Looks great though.
> Source/WebCore/storage/IDBCursorBackendImpl.cpp:104 > +
newline seems kinda useless....you could even use a ternary operator if you wanted...don't care much either way tho
Hans Wennborg
Comment 3
2011-02-04 09:03:53 PST
(In reply to
comment #2
)
> (From update of
attachment 81073
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=81073&action=review
> > Maybe you should make your test function a bit more generic and then you can specifically test more corner cases: the first element, the last, the current, the previous, a couple previous, the next, and a couple later. (The last is all you test now.) I don't think it'll take too much time and it'll definitely make this more robust in the future.
You're right. Trying to make the test a bit more generic and less spaghetti.
> > Looks great though. > > > Source/WebCore/storage/IDBCursorBackendImpl.cpp:104 > > + > > newline seems kinda useless....you could even use a ternary operator if you wanted...don't care much either way tho
Done.
Hans Wennborg
Comment 4
2011-02-04 09:04:19 PST
Created
attachment 81226
[details]
Patch
Jeremy Orlow
Comment 5
2011-02-04 10:44:03 PST
Comment on
attachment 81226
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=81226&action=review
This test should also verify that anything not deleted is seen while iterating. r=me assuming you do that.
> LayoutTests/storage/indexeddb/cursor-skip-deleted.html:61 > + resetObjectStore(); // No callback; let the setVersion transaction complete.
Seems cleaner to pass in an empty function here...you probably don't even need a comment then.
> LayoutTests/storage/indexeddb/cursor-skip-deleted.html:140 > + {id: 15, targets: [13,14]}
while you're at it, might as well throw a few more interesting combinations in. :-)
> LayoutTests/storage/indexeddb/cursor-skip-deleted.html:169 > + testCursor(deletes, "trans.objectStore('store').index('nameIndex').openCursor(webkitIDBKeyRange.lowerBound('Alpha'))", function() { resetObjectStore(); });
why do a final reset?
Hans Wennborg
Comment 6
2011-02-09 02:33:50 PST
Committed
r78035
: <
http://trac.webkit.org/changeset/78035
>
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