Index: Source/bindings/scripts/v8_types.py |
diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
index 944db4a604f6a029d45528807efeb4a48f8c9696..944fecef0eea2b7224a10122553a97e9c505e724 100644 |
--- a/Source/bindings/scripts/v8_types.py |
+++ b/Source/bindings/scripts/v8_types.py |
@@ -193,7 +193,7 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_ |
if idl_type.is_dictionary: |
return base_idl_type |
if idl_type.is_union_type: |
- return idl_type.name |
+ return idl_type.as_union_type.name |
# Default, assume native type is a pointer with same type name as idl type |
return base_idl_type + '*' |
@@ -517,7 +517,7 @@ def v8_value_to_cpp_value(idl_type, extended_attributes, v8_value, variable_name |
# Simple types |
idl_type = idl_type.preprocessed_type |
add_includes_for_type(idl_type) |
- base_idl_type = idl_type.name if idl_type.is_union_type else idl_type.base_type |
+ base_idl_type = idl_type.as_union_type.name if idl_type.is_union_type else idl_type.base_type |
if 'EnforceRange' in extended_attributes: |
arguments = ', '.join([v8_value, 'EnforceRange', 'exceptionState']) |
@@ -862,7 +862,8 @@ def cpp_type_has_null_value(idl_type): |
# a null pointer. |
# - 'Object' type. We use ScriptValue for object type. |
return (idl_type.is_string_type or idl_type.is_wrapper_type or |
- idl_type.is_enum or idl_type.base_type == 'object') |
+ idl_type.is_enum or idl_type.is_union_type or |
+ idl_type.base_type == 'object') |
IdlTypeBase.cpp_type_has_null_value = property(cpp_type_has_null_value) |