Bug 63079

Summary: IndexedDB: should throw TypeError when index .get() key argument is missing
Product: WebKit Reporter: Mark Pilgrim (Google) <pilgrim>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dgrogan, fishd, hans, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
patch with nits none

Description Mark Pilgrim (Google) 2011-06-21 11:11:05 PDT
http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#widl-IDBIndex-get-IDBRequest-any-key states that the key argument of IDBIndex.get() method is required. As per WebIDL, missing required arguments now throw TypeError. This also applies to the IDBIndex.getKey() method as well.

Attached test case calls .get() and .getKey() with no arguments.

Expected behavior: throw TypeError
Actual behavior: does not throw

Patch included.
Comment 1 Mark Pilgrim (Google) 2011-06-21 11:13:57 PDT
Created attachment 98014 [details]
Patch
Comment 2 David Grogan 2011-06-21 11:25:54 PDT
Comment on attachment 98014 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=98014&action=review

Other than minor comment below, LGTM

> LayoutTests/storage/indexeddb/index-get-key-argument-required.html:14
> +description("Test IndexedDB undefined as record value");

Forgot to update this.
Comment 3 Mark Pilgrim (Google) 2011-06-21 11:35:28 PDT
Created attachment 98024 [details]
patch with nits
Comment 4 WebKit Review Bot 2011-06-21 13:57:47 PDT
Comment on attachment 98024 [details]
patch with nits

Clearing flags on attachment: 98024

Committed r89377: <http://trac.webkit.org/changeset/89377>
Comment 5 WebKit Review Bot 2011-06-21 13:57:52 PDT
All reviewed patches have been landed.  Closing bug.