Bug 63079 - IndexedDB: should throw TypeError when index .get() key argument is missing
Summary: IndexedDB: should throw TypeError when index .get() key argument is missing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-21 11:11 PDT by Mark Pilgrim (Google)
Modified: 2011-06-21 13:57 PDT (History)
6 users (show)

See Also:


Attachments
Patch (5.46 KB, patch)
2011-06-21 11:13 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff
patch with nits (5.47 KB, patch)
2011-06-21 11:35 PDT, Mark Pilgrim (Google)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.