Bug 63085 - IndexedDB: keyrange methods should throw TypeError if required arguments are missing
Summary: IndexedDB: keyrange methods should throw TypeError if required arguments are ...
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 12:21 PDT by Mark Pilgrim (Google)
Modified: 2011-06-21 14:10 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.86 KB, patch)
2011-06-21 12:22 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 12:21:04 PDT
http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#idl-def-IDBKeyRange states that only(), lowerBound(), upperBound(), and bound() have required arguments. As per the WebIDL spec, calling these functions without the required arguments should throw a TypeError. This test calls these functions without arguments, or with too few arguments, and checks that they throw properly.

Expected behavior: throw TypeError
Actual behavior: does not throw, creates IDBKeyRange object

Patch included. The fix is to remove the LegacyDefaultOptionalArguments flag from the IDBKeyRange.idl. This will force the code generator to check for required arguments and throw TypeError if they are missing.
Comment 1 Mark Pilgrim (Google) 2011-06-21 12:22:42 PDT
Created attachment 98039 [details]
Patch
Comment 2 WebKit Review Bot 2011-06-21 14:10:10 PDT
Comment on attachment 98039 [details]
Patch

Clearing flags on attachment: 98039

Committed r89380: <http://trac.webkit.org/changeset/89380>
Comment 3 WebKit Review Bot 2011-06-21 14:10:15 PDT
All reviewed patches have been landed.  Closing bug.