[webkit-reviews] review granted: [Bug 70743] IndexedDB: Replace bool args in IDBKeyRange private methods with enum : [Attachment 118237] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 7 11:38:08 PST 2011


Tony Chang <tony at chromium.org> has granted Joshua Bell <jsbell at chromium.org>'s
request for review:
Bug 70743: IndexedDB: Replace bool args in IDBKeyRange private methods with
enum
https://bugs.webkit.org/show_bug.cgi?id=70743

Attachment 118237: Patch
https://bugs.webkit.org/attachment.cgi?id=118237&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=118237&action=review


The ternaries aren't great, but it seems like we just have to push the enum
usage further out and they will go away.

> Source/WebCore/storage/IDBKeyRange.cpp:52
> -    return IDBKeyRange::create(key, key, false, false);
> +    return IDBKeyRange::create(key, key, LowerBoundClosed,
UpperBoundClosed);

This is definitely easier to read.

> Source/WebCore/storage/IDBKeyRange.cpp:55
>  PassRefPtr<IDBKeyRange> IDBKeyRange::lowerBound(PassRefPtr<IDBKey> bound,
bool open, ExceptionCode& ec)

Using LowerBoundType here would be nice.  Could be a follow up change.

> Source/WebCore/storage/IDBKeyRange.cpp:65
>  PassRefPtr<IDBKeyRange> IDBKeyRange::upperBound(PassRefPtr<IDBKey> bound,
bool open, ExceptionCode& ec)

And UpperBoundType here.


More information about the webkit-reviews mailing list