[Webkit-unassigned] [Bug 83302] IndexedDB: Refactor cursor iteration to remove duplicate code

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 5 12:28:55 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=83302





--- Comment #3 from Joshua Bell <jsbell at chromium.org>  2012-04-05 12:28:55 PST ---
(From update of attachment 135871)
View in context: https://bugs.webkit.org/attachment.cgi?id=135871&action=review

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1018
> +    bool checkCurrentBoundaries() const;

Boundaries don't change, so is "Current" needed? Maybe rename to "isInBounds"? But it also only checks the end boundary - can that be captured in the name?

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1042
> +        // in the very first seek, we're already in the right

I don't think this comment is necessary; the behavior it's describing is implied by the code.

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1060
> +        // check if we've advanced past the range

Unnecessary comment, if the method name can be clarified.

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1064
> +        // check if haven't yet *entered* the range

Nit: Capitalization, grammar, and punctuation.

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1079
> +        // we'll need more information from the current row to continue

Looking at loadCurrentRow(), it returns false if the row fails to load. So the behavior is to keep iterating if the data is invalid. Can this comment be improved?

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1102
> +// return true if we're still within the upper/lower bounds of this range

Don't need this comment.

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1107
> +            // high key not included in range

Nit: capitalize, add period.

> Source/WebCore/Modules/indexeddb/IDBLevelDBBackingStore.cpp:1116
> +            // low key not included in range

Nit: capitalize, add period.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list