Chromium Code Reviews

Unified Diff: Source/bindings/scripts/v8_interface.py

Issue 466323002: IDL: Use Nullable for union type return value (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: Source/bindings/scripts/v8_interface.py
diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
index 6f3b7fe078f37e421b5b6c2823fd571b381de154..772023721da561cfe621a70fda7ebeb47f1f4d06 100644
--- a/Source/bindings/scripts/v8_interface.py
+++ b/Source/bindings/scripts/v8_interface.py
@@ -934,7 +934,7 @@ def interface_length(interface, constructors):
def property_getter(getter, cpp_arguments):
def is_null_expression(idl_type):
if idl_type.is_union_type:
- return ' && '.join('!result%sEnabled' % i
+ return ' && '.join('result%s.isNull()' % i
for i, _ in enumerate(idl_type.member_types))
if idl_type.name == 'String':
return 'result.isNull()'

Powered by Google App Engine