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

Issue 698423002: IDL union: nullable support (Closed)

Created:
6 years, 1 month ago by bashi
Modified:
6 years, 1 month ago
Reviewers:
haraken, Jens Widell
CC:
blink-reviews, blink-reviews-bindings_chromium.org, arv+blink, tasak
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

IDL union: nullable support Creating container class for nullable union types would generate a lot of duplications. Suppose we have (A or B) and (A or B)?. The current implementation will generate two classes: AOrB and AOrBOrNull. The only difference between them is whether toImpl() checks isUndefinedOrNull() at first. To avoid duplication, this CL generates toImpl() only for nullable union types. This CL includes part of Jens' work[1] [1] https://codereview.chromium.org/700093002/ BUG=240176 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185005

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : #

Total comments: 24

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+238 lines, -27 lines) Patch
M Source/bindings/scripts/code_generator_v8.py View 1 1 chunk +1 line, -2 lines 0 comments Download
M Source/bindings/scripts/idl_types.py View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/bindings/scripts/v8_types.py View 1 2 3 5 chunks +39 lines, -4 lines 0 comments Download
M Source/bindings/scripts/v8_union.py View 1 2 3 3 chunks +32 lines, -2 lines 0 comments Download
M Source/bindings/templates/union.h View 1 2 3 1 chunk +14 lines, -0 lines 0 comments Download
M Source/bindings/templates/union.cpp View 1 2 1 chunk +1 line, -3 lines 0 comments Download
M Source/bindings/tests/idls/core/TestObject.idl View 1 2 3 2 chunks +6 lines, -2 lines 0 comments Download
M Source/bindings/tests/results/core/UnionTypesCore.h View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M Source/bindings/tests/results/core/V8TestObject.cpp View 1 2 3 5 chunks +130 lines, -14 lines 0 comments Download

Messages

Total messages: 24 (3 generated)
bashi
Haraken-san, Jens, I'm not asking for actual review, but want to hear your opinions. Could ...
6 years, 1 month ago (2014-11-05 08:23:45 UTC) #2
haraken
I'd prefer the approach 2 or 3, since (A or B) and (A or B)? ...
6 years, 1 month ago (2014-11-05 08:32:53 UTC) #3
Jens Widell
I'd propose we do something like this: https://codereview.chromium.org/700093002
6 years, 1 month ago (2014-11-05 08:45:06 UTC) #4
bashi
Thank you for the inputs, Haraken-san, Jens! > I agree that the approach 2 will ...
6 years, 1 month ago (2014-11-05 09:20:51 UTC) #5
Yuki
On 2014/11/05 09:20:51, bashi1 wrote: > Thank you for the inputs, Haraken-san, Jens! > > ...
6 years, 1 month ago (2014-11-05 09:29:18 UTC) #6
haraken
BTW, I gave a short talk about IDL union type at a lightning talk of ...
6 years, 1 month ago (2014-11-05 09:30:14 UTC) #7
bashi
On 2014/11/05 09:30:14, haraken wrote: > BTW, I gave a short talk about IDL union ...
6 years, 1 month ago (2014-11-05 09:34:29 UTC) #8
Jens Widell
On 2014/11/05 09:29:18, Yuki wrote: > On 2014/11/05 09:20:51, bashi1 wrote: > > Thank you ...
6 years, 1 month ago (2014-11-05 09:46:37 UTC) #9
bashi
On 2014/11/05 09:46:37, Jens Widell wrote: > On 2014/11/05 09:29:18, Yuki wrote: > > On ...
6 years, 1 month ago (2014-11-07 00:03:17 UTC) #10
haraken
On 2014/11/07 00:03:17, bashi1 wrote: > On 2014/11/05 09:46:37, Jens Widell wrote: > > On ...
6 years, 1 month ago (2014-11-07 00:08:29 UTC) #11
bashi
Revised the CL for actual review. Could you take a look at the CL? I'll ...
6 years, 1 month ago (2014-11-07 03:53:00 UTC) #12
Jens Widell
https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py#newcode196 Source/bindings/scripts/v8_types.py:196: return idl_type.as_union_type.name So, if you have (A? or B), ...
6 years, 1 month ago (2014-11-07 07:11:53 UTC) #13
bashi
Thank you for review! https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py#newcode196 Source/bindings/scripts/v8_types.py:196: return idl_type.as_union_type.name On 2014/11/07 07:11:53, ...
6 years, 1 month ago (2014-11-07 10:07:53 UTC) #14
Jens Widell
https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py#newcode196 Source/bindings/scripts/v8_types.py:196: return idl_type.as_union_type.name On 2014/11/07 10:07:53, bashi1 wrote: > On ...
6 years, 1 month ago (2014-11-07 10:58:19 UTC) #15
haraken
Looks good. https://codereview.chromium.org/698423002/diff/40001/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/698423002/diff/40001/Source/bindings/scripts/v8_types.py#newcode197 Source/bindings/scripts/v8_types.py:197: # V8AOrBOrNull to handle nulle for (A? ...
6 years, 1 month ago (2014-11-07 18:06:32 UTC) #16
Jens Widell
https://codereview.chromium.org/698423002/diff/40001/Source/bindings/scripts/v8_union.py File Source/bindings/scripts/v8_union.py (right): https://codereview.chromium.org/698423002/diff/40001/Source/bindings/scripts/v8_union.py#newcode29 Source/bindings/scripts/v8_union.py:29: union_types_for_containers.add(union_type.as_union_type) On 2014/11/07 18:06:31, haraken wrote: > > I'm ...
6 years, 1 month ago (2014-11-07 18:15:46 UTC) #17
bashi
https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py File Source/bindings/scripts/v8_types.py (right): https://codereview.chromium.org/698423002/diff/20001/Source/bindings/scripts/v8_types.py#newcode196 Source/bindings/scripts/v8_types.py:196: return idl_type.as_union_type.name On 2014/11/07 10:58:19, Jens Widell wrote: > ...
6 years, 1 month ago (2014-11-08 07:10:35 UTC) #19
haraken
LGTM
6 years, 1 month ago (2014-11-08 08:27:24 UTC) #20
Jens Widell
LGTM
6 years, 1 month ago (2014-11-08 08:34:34 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/698423002/80001
6 years, 1 month ago (2014-11-08 08:59:06 UTC) #23
commit-bot: I haz the power
6 years, 1 month ago (2014-11-08 11:14:46 UTC) #24
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as 185005

Powered by Google App Engine
This is Rietveld 408576698