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

Issue 937773002: IDL: Support default values for dictionary members of union types (Closed)

Created:
5 years, 10 months ago by Jens Widell
Modified:
5 years, 10 months ago
Reviewers:
haraken, bashi
CC:
blink-reviews, blink-reviews-bindings_chromium.org, vivekg_samsung, arv+blink, vivekg
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

IDL: Support default values for dictionary members of union types Fix in three parts: 1) For each union member, add a static "fromThatType(ThatType value)" function, that constructs and returns a union type container object. 2) Add IdlUnionType.literal_cpp_value() that returns an C++ expression using a static function (added in 1) that matches the literal value. 3) Use idl_type.literal_cpp_value(literal_value) in v8_dictionary.py instead of str(literal_value), thus using the union type override (added in 2) for union type members. BUG=240176, 321462 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190464

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -3 lines) Patch
M Source/bindings/scripts/v8_dictionary.py View 2 chunks +3 lines, -2 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 chunk +17 lines, -0 lines 2 comments Download
M Source/bindings/templates/union.h View 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/templates/union.cpp View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/bindings/tests/idls/core/TestDictionary.idl View 1 chunk +2 lines, -1 line 0 comments Download
M Source/bindings/tests/results/core/TestDictionary.h View 2 chunks +5 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/core/TestDictionary.cpp View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/core/UnionTypesCore.h View 14 chunks +31 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/core/UnionTypesCore.cpp View 31 chunks +217 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestDictionary.cpp View 3 chunks +21 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/modules/UnionTypesModules.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/modules/UnionTypesModules.cpp View 2 chunks +14 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (2 generated)
Jens Widell
PTAL
5 years, 10 months ago (2015-02-18 14:47:08 UTC) #2
haraken
https://codereview.chromium.org/937773002/diff/1/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/937773002/diff/1/Source/bindings/scripts/v8_types.py#newcode900 Source/bindings/scripts/v8_types.py:900: def union_literal_cpp_value(idl_type, idl_literal): Can we merge literal_cpp_value and union_literal_cpp_value? ...
5 years, 10 months ago (2015-02-18 15:09:04 UTC) #3
Jens Widell
https://codereview.chromium.org/937773002/diff/1/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/937773002/diff/1/Source/bindings/scripts/v8_types.py#newcode900 Source/bindings/scripts/v8_types.py:900: def union_literal_cpp_value(idl_type, idl_literal): On 2015/02/18 15:09:04, haraken wrote: > ...
5 years, 10 months ago (2015-02-18 15:14:39 UTC) #4
haraken
On 2015/02/18 15:14:39, Jens Widell wrote: > https://codereview.chromium.org/937773002/diff/1/Source/bindings/scripts/v8_types.py > File Source/bindings/scripts/v8_types.py (right): > > https://codereview.chromium.org/937773002/diff/1/Source/bindings/scripts/v8_types.py#newcode900 ...
5 years, 10 months ago (2015-02-18 15:19:55 UTC) #5
bashi
LGTM
5 years, 10 months ago (2015-02-19 01:33:44 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/937773002/1
5 years, 10 months ago (2015-02-19 09:34:32 UTC) #8
commit-bot: I haz the power
5 years, 10 months ago (2015-02-19 13:12:04 UTC) #9
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=190464

Powered by Google App Engine
This is Rietveld 408576698