Index: Source/bindings/scripts/v8_methods.py |
diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py |
index 2dff48b00498b23a56ce8dc294288474bfa05903..ccb8a964642102f1efa0bc11a9af290c9c3b4cf3 100644 |
--- a/Source/bindings/scripts/v8_methods.py |
+++ b/Source/bindings/scripts/v8_methods.py |
@@ -406,10 +406,12 @@ def union_member_argument_context(idl_type, index): |
"""Returns a context of union member for argument.""" |
this_cpp_value = 'result%d' % index |
this_cpp_type = idl_type.cpp_type |
+ this_cpp_type_initializer = idl_type.cpp_type_initializer |
cpp_return_value = this_cpp_value |
if not idl_type.cpp_type_has_null_value: |
this_cpp_type = v8_types.cpp_template_type('Nullable', this_cpp_type) |
+ this_cpp_type_initializer = '' |
cpp_return_value = '%s.get()' % this_cpp_value |
if idl_type.is_string_type: |
@@ -419,6 +421,7 @@ def union_member_argument_context(idl_type, index): |
return { |
'cpp_type': this_cpp_type, |
+ 'cpp_type_initializer': this_cpp_type_initializer, |
'cpp_value': this_cpp_value, |
'null_check_value': null_check_value, |
'v8_set_return_value': idl_type.v8_set_return_value( |