Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Issue 47023015: IDL compiler: [Default] arguments (Closed)

Created:
7 years, 1 month ago by Nils Barth (inactive)
Modified:
7 years, 1 month ago
Reviewers:
haraken
CC:
blink-reviews, kojih, jsbell+bindings_chromium.org, abarth-chromium, marja+watch_chromium.org, adamk+blink_chromium.org, Nate Chapin, Inactive, kouhei (in TOK)
Visibility:
Public.

Description

IDL compiler: [Default] arguments V. widely used. Long-term we should instead use the Web IDL standard: optional type identifier = value instead of [Default=value] optional type identifier ...which is much cleaner and clearer, but that requires parser support and isn't worth doing in Perl. Docs: http://www.w3.org/TR/WebIDL/#dfn-optional-argument-default-value https://sites.google.com/a/chromium.org/dev/blink/webidl/blink-idl-extended-attributes#TOC-Default-p- BUG=239771 NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=161026

Patch Set 1 #

Total comments: 3

Patch Set 2 : Revised #

Unified diffs Side-by-side diffs Delta from patch set Stats (+112 lines, -14 lines) Patch
M Source/bindings/scripts/code_generator_v8.pm View 1 chunk +0 lines, -1 line 0 comments Download
M Source/bindings/scripts/unstable/v8_methods.py View 1 3 chunks +12 lines, -3 lines 0 comments Download
M Source/bindings/templates/methods.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/bindings/tests/idls/TestObjectPython.idl View 1 chunk +8 lines, -1 line 0 comments Download
M Source/bindings/tests/results/V8TestObjectPython.cpp View 4 chunks +91 lines, -8 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Nils Barth (inactive)
https://codereview.chromium.org/47023015/diff/1/Source/bindings/scripts/code_generator_v8.pm File Source/bindings/scripts/code_generator_v8.pm (left): https://codereview.chromium.org/47023015/diff/1/Source/bindings/scripts/code_generator_v8.pm#oldcode2457 Source/bindings/scripts/code_generator_v8.pm:2457: # Optional arguments with [Optional=...] should not generate the ...
7 years, 1 month ago (2013-10-31 05:52:20 UTC) #1
haraken
LGTM https://codereview.chromium.org/47023015/diff/1/Source/bindings/scripts/unstable/v8_methods.py File Source/bindings/scripts/unstable/v8_methods.py (right): https://codereview.chromium.org/47023015/diff/1/Source/bindings/scripts/unstable/v8_methods.py#newcode126 Source/bindings/scripts/unstable/v8_methods.py:126: v8_value = 'argumentOrNull(args, %s)' % index We might ...
7 years, 1 month ago (2013-10-31 06:05:14 UTC) #2
Nils Barth (inactive)
Thanks! (Comment about adding checks/asserts.) https://codereview.chromium.org/47023015/diff/1/Source/bindings/scripts/unstable/v8_methods.py File Source/bindings/scripts/unstable/v8_methods.py (right): https://codereview.chromium.org/47023015/diff/1/Source/bindings/scripts/unstable/v8_methods.py#newcode126 Source/bindings/scripts/unstable/v8_methods.py:126: v8_value = 'argumentOrNull(args, %s)' ...
7 years, 1 month ago (2013-10-31 06:26:27 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nbarth@chromium.org/47023015/50001
7 years, 1 month ago (2013-10-31 06:27:34 UTC) #4
commit-bot: I haz the power
Change committed as 161026
7 years, 1 month ago (2013-10-31 06:27:47 UTC) #5
haraken
> How does this sound? > (I'm happy to add checks if it's useful, but ...
7 years, 1 month ago (2013-10-31 06:34:26 UTC) #6
Nils Barth (inactive)
7 years, 1 month ago (2013-10-31 07:09:02 UTC) #7
Message was sent while issue was closed.
On 2013/10/31 06:34:26, haraken wrote:
> Makes sense. We don't want to mess up the code generator just for validation.
On
> the other hand, we might want to add some validation for common mistakes
(e.g.,
> [Default=NullString] for DOMString parameters). Either way, it's OK to not
have
> the validation for now.

Got it!

Powered by Google App Engine
This is Rietveld 408576698