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

Issue 15076011: Support union return type for anonymous named/indexed getter (Closed)

Created:
7 years, 7 months ago by kojih
Modified:
7 years, 7 months ago
CC:
blink-reviews, loislo+blink_chromium.org, jsbell+bindings_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, abarth-chromium, adamk+blink_chromium.org, Nate Chapin, jeez, alancutter (OOO until 2018)
Base URL:
https://chromium.googlesource.com/chromium/blink@master
Visibility:
Public.

Description

Support union return type for anonymous named/indexed getter Currently union return type is treated in custom binding. To auto-generate that, - create UnionType - create function which returns UnionType in webcore - call that function from namedPropertyGetter in binding code Next step: - Support union return type for general method This patch also replace custom named getter of V8HTMLFormControlsCollection with auto generated one. R=haraken@chromium.org BUG=240176 TEST=TestEventTarget.idl, TestObject.idl NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150564

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Total comments: 11

Patch Set 3 : updated #

Total comments: 17

Patch Set 4 : updated #

Patch Set 5 : #

Total comments: 1

Patch Set 6 : updated #

Patch Set 7 : updated #

Patch Set 8 : updated #

Patch Set 9 : update #

Total comments: 9

Patch Set 10 : updated #

Patch Set 11 : rebased #

Patch Set 12 : use output arguments instead of UnionType2 #

Patch Set 13 : #

Total comments: 12

Patch Set 14 : #

Total comments: 10

Patch Set 15 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+199 lines, -86 lines) Patch
M Source/bindings/scripts/CodeGeneratorV8.pm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 14 chunks +125 lines, -52 lines 0 comments Download
M Source/bindings/scripts/IDLParser.pm View 1 2 3 4 5 6 7 8 6 chunks +30 lines, -21 lines 0 comments Download
M Source/bindings/tests/idls/TestInterface.idl View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M Source/bindings/tests/results/V8TestInterface.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +23 lines, -1 line 0 comments Download
M Source/bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp View 1 chunk +0 lines, -11 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +16 lines, -0 lines 0 comments Download
M Source/core/html/HTMLFormControlsCollection.idl View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 28 (0 generated)
kojih
r? https://codereview.chromium.org/15076011/diff/1/Source/bindings/scripts/CodeGeneratorV8.pm File Source/bindings/scripts/CodeGeneratorV8.pm (right): https://codereview.chromium.org/15076011/diff/1/Source/bindings/scripts/CodeGeneratorV8.pm#newcode3321 Source/bindings/scripts/CodeGeneratorV8.pm:3321: return jsValue; I had to create "create and ...
7 years, 7 months ago (2013-05-15 09:28:26 UTC) #1
kojih
7 years, 7 months ago (2013-05-15 09:39:30 UTC) #2
haraken
The approach looks good. The union type will enable us to remove more custom bindings! ...
7 years, 7 months ago (2013-05-15 10:56:25 UTC) #3
kojih
diff of generated code is: +v8::Handle<v8::Value> V8HTMLFormControlsCollection::namedPropertyGetter(v8::Local<v8::String> name, const v8::AccessorInfo& info) +{ + if (!info.Holder()->GetRealNamedPropertyInPrototypeChain(name).IsEmpty()) ...
7 years, 7 months ago (2013-05-15 11:30:19 UTC) #4
haraken
https://codereview.chromium.org/15076011/diff/12001/Source/bindings/scripts/CodeGeneratorV8.pm File Source/bindings/scripts/CodeGeneratorV8.pm (right): https://codereview.chromium.org/15076011/diff/12001/Source/bindings/scripts/CodeGeneratorV8.pm#newcode1645 Source/bindings/scripts/CodeGeneratorV8.pm:1645: $code .= " return " . NativeToJSValue($attribute->signature->type, $attribute->signature->extendedAttributes, $expression, ...
7 years, 7 months ago (2013-05-15 12:09:43 UTC) #5
jsbell
This is awesome! Thanks for taking this on. Just a couple of drive-by comments. https://codereview.chromium.org/15076011/diff/12001/Source/bindings/tests/results/V8TestObject.cpp ...
7 years, 7 months ago (2013-05-15 21:37:52 UTC) #6
kojih
haraken: r? jsbell: Reflected your comments. Thank you! Diff of generated code is: --- /mnt/hdd/diff/gen_stmt/V8HTMLFormControlsCollection.cpp ...
7 years, 7 months ago (2013-05-16 05:22:57 UTC) #7
kojih
please see patch set 9.
7 years, 7 months ago (2013-05-16 05:24:28 UTC) #8
haraken
https://codereview.chromium.org/15076011/diff/19003/Source/bindings/scripts/CodeGeneratorV8.pm File Source/bindings/scripts/CodeGeneratorV8.pm (right): https://codereview.chromium.org/15076011/diff/19003/Source/bindings/scripts/CodeGeneratorV8.pm#newcode3178 Source/bindings/scripts/CodeGeneratorV8.pm:3178: my $nativeExpression = "element"; Nit: $nativeExpression => $nativeValue https://codereview.chromium.org/15076011/diff/19003/Source/bindings/scripts/CodeGeneratorV8.pm#newcode3181 ...
7 years, 7 months ago (2013-05-16 05:38:05 UTC) #9
kojih
https://codereview.chromium.org/15076011/diff/19003/Source/bindings/scripts/IDLParser.pm File Source/bindings/scripts/IDLParser.pm (right): https://codereview.chromium.org/15076011/diff/19003/Source/bindings/scripts/IDLParser.pm#newcode1793 Source/bindings/scripts/IDLParser.pm:1793: push @{$unionType->unionMemberTypes}, $self->parseUnionMemberTypes(); I confirmed following. interface TestInterface { ...
7 years, 7 months ago (2013-05-16 05:51:20 UTC) #10
haraken
OK, LGTM with nits mentioned above!
7 years, 7 months ago (2013-05-16 05:52:45 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kojih@chromium.org/15076011/35001
7 years, 7 months ago (2013-05-16 10:20:22 UTC) #12
kojih
eseidel: Hi, I added Source/wtf/UnionType.h Is it OK?
7 years, 7 months ago (2013-05-16 10:26:21 UTC) #13
commit-bot: I haz the power
Retried try job too often on blink_bare_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=blink_bare_presubmit&number=1118
7 years, 7 months ago (2013-05-16 10:34:00 UTC) #14
kojih
On 2013/05/16 10:26:21, kojih wrote: > eseidel: > Hi, I added Source/wtf/UnionType.h > Is it ...
7 years, 7 months ago (2013-05-17 01:39:09 UTC) #15
kojih
appropriate place
7 years, 7 months ago (2013-05-17 01:43:03 UTC) #16
kojih
as discussed in offline with morita-san, I decided to use output arguments instead of UnionType2. ...
7 years, 7 months ago (2013-05-17 04:38:41 UTC) #17
kojih
haraken: Changed to use output arguments instead of UnionType2. r?
7 years, 7 months ago (2013-05-17 05:13:18 UTC) #18
haraken
https://codereview.chromium.org/15076011/diff/44002/Source/bindings/scripts/CodeGeneratorV8.pm File Source/bindings/scripts/CodeGeneratorV8.pm (right): https://codereview.chromium.org/15076011/diff/44002/Source/bindings/scripts/CodeGeneratorV8.pm#newcode3063 Source/bindings/scripts/CodeGeneratorV8.pm:3063: sub GetUnionMemberVariableName This method can simply return '"member" . ...
7 years, 7 months ago (2013-05-17 05:44:48 UTC) #19
kojih
fixed.
7 years, 7 months ago (2013-05-17 06:15:14 UTC) #20
haraken
LGTM with nits. https://codereview.chromium.org/15076011/diff/51001/Source/bindings/scripts/CodeGeneratorV8.pm File Source/bindings/scripts/CodeGeneratorV8.pm (right): https://codereview.chromium.org/15076011/diff/51001/Source/bindings/scripts/CodeGeneratorV8.pm#newcode3079 Source/bindings/scripts/CodeGeneratorV8.pm:3079: my $unionMemberVariable = $variableName . GetUnionMemberVariableName($i); ...
7 years, 7 months ago (2013-05-17 07:10:36 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kojih@chromium.org/15076011/53002
7 years, 7 months ago (2013-05-17 07:38:46 UTC) #22
commit-bot: I haz the power
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout_rel&number=6033
7 years, 7 months ago (2013-05-17 08:34:51 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kojih@chromium.org/15076011/53002
7 years, 7 months ago (2013-05-17 09:29:25 UTC) #24
kojih
NOTRY=TRUE
7 years, 7 months ago (2013-05-17 09:29:28 UTC) #25
kojih
NO TRY=TRUE
7 years, 7 months ago (2013-05-17 09:32:19 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kojih@chromium.org/15076011/53002
7 years, 7 months ago (2013-05-17 09:48:45 UTC) #27
commit-bot: I haz the power
7 years, 7 months ago (2013-05-17 09:49:07 UTC) #28
Message was sent while issue was closed.
Change committed as 150564

Powered by Google App Engine
This is Rietveld 408576698