DescriptionIDL: Support using nullable on any method return type
Previously, nullable string and wrapper types was supported, since those
types have a native/natural null representation in C++. Other types,
like primitives (long, boolean) or complex types like sequence<>, could
not be nullable.
With this CL, nullable return types other than string or wrapper types
are handled using Nullable<T>, like so:
Nullable<T> result = impl->method(...);
if (result.isNull())
v8SetReturnValueNull(info);
else
v8SetReturnValue...(info, ... result.get() ...);
This CL does not change code generation since currently no method return
such a nullable type.
BUG=390780
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177887
Patch Set 1 #
Total comments: 13
Patch Set 2 : add comment in is_nullable_simple() #
Total comments: 4
Patch Set 3 : use_result_local => use_local_result #
Messages
Total messages: 17 (0 generated)
|