[webkit-reviews] review granted: [Bug 79422] IndexedDB: IDBObjectStore.count() and IDBIndex.count() should accept key argument : [Attachment 128607] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 19:00:01 PST 2012


Tony Chang <tony at chromium.org> has granted Joshua Bell <jsbell at chromium.org>'s
request for review:
Bug 79422: IndexedDB: IDBObjectStore.count() and IDBIndex.count() should accept
key argument
https://bugs.webkit.org/show_bug.cgi?id=79422

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

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


> Source/WebCore/storage/IDBIndex.idl:48
>	   [CallWith=ScriptExecutionContext] IDBRequest count(in [Optional]
IDBKeyRange range)
>	       raises (IDBDatabaseException);
> +	   [CallWith=ScriptExecutionContext] IDBRequest count(in IDBKey key)
> +	       raises (IDBDatabaseException);

The spec defines overloaded methods?  That seems unfortunate if both can take
null.

> LayoutTests/storage/indexeddb/objectstore-count.html:128
> +    evalAndExpectException("store.count(NaN)",
"IDBDatabaseException.DATA_ERR");
> +    evalAndExpectException("store.count({})",
"IDBDatabaseException.DATA_ERR");
> +    evalAndExpectException("store.count(/regex/)",
"IDBDatabaseException.DATA_ERR");

Can you add a test that passes in null?  Maybe that's elsewhere?


More information about the webkit-reviews mailing list