[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 14:18:44 PDT 2012


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





--- Comment #5 from Alec Flett <alecflett at chromium.org>  2012-04-05 14:18:44 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?

I reversed it to isPastBounds() and added a clarifying comment (hoping that will make it by the webkit guidelines)

>> 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?

The semantics of this aren't great, but this is what was there before - It looks like it's not really fatal, because sometimes indexes have stale entries and you just have to keep iterating until you find a non-stale entry.

-- 
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