Bug 157017 - [Web IDL] Specify default values for optional parameters of TypedArray types
Summary: [Web IDL] Specify default values for optional parameters of TypedArray types
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Bindings (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-25 20:01 PDT by Chris Dumez
Modified: 2016-04-26 09:11 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.55 KB, patch)
2016-04-25 20:40 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2016-04-25 20:01:28 PDT
Specify default values for optional parameters of TypedArray types and let the bindings generator use WTF::Optional<> for the ones that do not have a default value.
Comment 1 Chris Dumez 2016-04-25 20:40:50 PDT
Created attachment 277320 [details]
Patch
Comment 2 Darin Adler 2016-04-26 08:21:03 PDT
Comment on attachment 277320 [details]
Patch

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

> Source/WebCore/html/HTMLMediaElement.idl:102
> +    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitGenerateKeyRequest(DOMString? keySystem, optional Uint8Array initData = null);
> +    [Conditional=ENCRYPTED_MEDIA, RaisesException] void webkitAddKey(DOMString? keySystem, Uint8Array key, optional Uint8Array initData = null, optional DOMString sessionId = null);

This seems a little peculiar. Given that the argument isn’t nullable, I’m not entirely sure that a default of “null” makes logical sense. Anyway, seems a fine practical way to leave the code for now.
Comment 3 WebKit Commit Bot 2016-04-26 09:11:53 PDT
Comment on attachment 277320 [details]
Patch

Clearing flags on attachment: 277320

Committed r200088: <http://trac.webkit.org/changeset/200088>
Comment 4 WebKit Commit Bot 2016-04-26 09:11:57 PDT
All reviewed patches have been landed.  Closing bug.