| Index: third_party/WebKit/Source/bindings/scripts/v8_union.py
|
| diff --git a/third_party/WebKit/Source/bindings/scripts/v8_union.py b/third_party/WebKit/Source/bindings/scripts/v8_union.py
|
| index fa22cdbac8cdabb86993dad1181c470e81ae327e..173aec2a60adb6fe8c38e781cbd538df714d51aa 100644
|
| --- a/third_party/WebKit/Source/bindings/scripts/v8_union.py
|
| +++ b/third_party/WebKit/Source/bindings/scripts/v8_union.py
|
| @@ -2,6 +2,7 @@
|
| # Use of this source code is governed by a BSD-style license that can be
|
| # found in the LICENSE file.
|
|
|
| +import v8_types
|
| import v8_utilities
|
|
|
|
|
| @@ -59,6 +60,13 @@ def union_context(union_types, interfaces_info):
|
|
|
|
|
| def container_context(union_type, interfaces_info):
|
| + cpp_includes.clear()
|
| + cpp_includes.update(set([
|
| + 'bindings/core/v8/ToV8.h',
|
| + ]))
|
| + header_forward_decls.clear()
|
| + header_includes.clear()
|
| + header_includes.update(UNION_H_INCLUDES)
|
| members = []
|
|
|
| # These variables refer to member contexts if the given union type has
|
| @@ -114,13 +122,17 @@ def container_context(union_type, interfaces_info):
|
| if dictionary_type and nullable_members == 1:
|
| raise Exception('%s has a dictionary and a nullable member' % union_type.name)
|
|
|
| + cpp_class = union_type.cpp_type
|
| return {
|
| 'array_buffer_type': array_buffer_type,
|
| 'array_buffer_view_type': array_buffer_view_type,
|
| 'array_or_sequence_type': array_or_sequence_type,
|
| 'boolean_type': boolean_type,
|
| - 'cpp_class': union_type.cpp_type,
|
| + 'cpp_class': cpp_class,
|
| + 'cpp_includes': sorted(cpp_includes - UNION_CPP_INCLUDES_BLACKLIST),
|
| 'dictionary_type': dictionary_type,
|
| + 'header_includes': sorted(header_includes - UNION_CPP_INCLUDES_BLACKLIST),
|
| + 'header_forward_decls': sorted(header_forward_decls),
|
| 'includes_nullable_type': union_type.includes_nullable_type,
|
| 'interface_types': interface_types,
|
| 'members': members,
|
| @@ -128,6 +140,7 @@ def container_context(union_type, interfaces_info):
|
| 'object_type': object_type,
|
| 'string_type': string_type,
|
| 'type_string': str(union_type),
|
| + 'v8_class': v8_types.v8_type(cpp_class),
|
| }
|
|
|
|
|
|
|