DescriptionIDL: Support optional union type arguments with default values
Since union container types have setters rather than assignment operators,
restructure the default value handling to generate a C++ expression that
sets the value instead of the value as a C++ literal expression.
And as a special case, since union containers are null initially, if the
default value is null, generate an empty expression then.
This also fixes a minor bug in the union handling: enum types were not
supported. They should be treated as string types, including conflicting
with any other string type in the union.
BUG=240176
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=185046
Patch Set 1 #Patch Set 2 : add unit tests #
Total comments: 2
Messages
Total messages: 15 (4 generated)
|