|
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
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
|
Total messages: 9 (2 generated)
|