Closed
Bug 615269
Opened 14 years ago
Closed 14 years ago
IndexedDB: Cursors should not copy all results before iterating
Categories
(Core :: Storage: IndexedDB, defect)
Core
Storage: IndexedDB
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | betaN+ |
People
(Reporter: bent.mozilla, Assigned: bent.mozilla)
Details
Attachments
(2 files, 1 obsolete file)
98.39 KB,
patch
|
sicking
:
review-
|
Details | Diff | Splinter Review |
11.46 KB,
patch
|
sicking
:
review+
|
Details | Diff | Splinter Review |
Patch attached, also makes |cursor.continue| not return a useless boolean.
Attachment #493723 -
Flags: review?(jonas)
Assignee | ||
Updated•14 years ago
|
blocking2.0: --- → ?
Assignee | ||
Updated•14 years ago
|
OS: Mac OS X → All
Assignee | ||
Comment 1•14 years ago
|
||
Comment on attachment 493723 [details] [diff] [review]
Patch, v1
Oops, this isn't quite ready yet.
Attachment #493723 -
Attachment is obsolete: true
Attachment #493723 -
Flags: review?(jonas)
Updated•14 years ago
|
blocking2.0: ? → betaN+
Personally I would just do the simple thing though.
Assignee | ||
Comment 4•14 years ago
|
||
(In reply to comment #3)
> Personally I would just do the simple thing though.
I'm hoping there was more to that comment than that ;)
Sorry, comment 3 was meant for a different bug.
Comment on attachment 494808 [details] [diff] [review]
Patch, v2
> IDBCursor::Continue(const jsval &aKey,
>+ if (key.IsUnset()) {
>+ key = mKey;
>+ }
The current key handling is very complicated. Rewrite to either of the solutions we talked about.
>+ else {
>+ switch (mDirection) {
>+ case nsIIDBCursor::NEXT:
>+ case nsIIDBCursor::NEXT_NO_DUPLICATE:
>+ if (key <= mKey) {
>+ return NS_ERROR_DOM_INDEXEDDB_DATA_ERR;
>+ }
>+ break;
>
>+ case nsIIDBCursor::PREV:
>+ case nsIIDBCursor::PREV_NO_DUPLICATE:
>+ if (key >= mKey) {
>+ return NS_ERROR_DOM_INDEXEDDB_DATA_ERR;
>+ }
>+ break;
>
>+ default:
>+ NS_NOTREACHED("Unknown direction type!");
>+ }
Simpler written as an if-statement.
Write tests for mutationgs.
Attachment #494808 -
Flags: review?(jonas) → review-
Assignee | ||
Comment 7•14 years ago
|
||
Attachment #496280 -
Flags: review?(jonas)
Comment on attachment 496280 [details] [diff] [review]
Review fixes
r=me if you change mKey to only be used as the result of the query, not as the to-serach-for key.
Attachment #496280 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 9•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: DOM → DOM: IndexedDB
Version: Trunk → unspecified
You need to log in
before you can comment on or make changes to this bug.
Description
•