Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/scripts/v8_methods.py |
| diff --git a/third_party/WebKit/Source/bindings/scripts/v8_methods.py b/third_party/WebKit/Source/bindings/scripts/v8_methods.py |
| index 81263b8df8abdf0a06ad711019441f75c7c1a7e9..cf1862d9a6663f2b16ca484342586461a3ca8694 100644 |
| --- a/third_party/WebKit/Source/bindings/scripts/v8_methods.py |
| +++ b/third_party/WebKit/Source/bindings/scripts/v8_methods.py |
| @@ -108,6 +108,15 @@ def method_context(interface, method, is_visible=True): |
| is_static = method.is_static |
| name = method.name |
| + # TODO(binji): better way to do this? |
| + if idl_type.is_explicit_nullable: |
| + this_cpp_type = v8_types.cpp_template_type('Nullable', |
| + idl_type.cpp_type) |
| + elif idl_type.is_array_buffer_view_or_typed_array: |
| + this_cpp_type = '%s::TypedArrayType*' % idl_type.cpp_type |
|
haraken
2017/04/06 08:43:54
How is this type used? I cannot find this type in
binji
2017/04/09 00:40:02
This happens when a interface method returns an Ar
|
| + else: |
| + this_cpp_type = idl_type.cpp_type |
| + |
| if is_visible: |
| idl_type.add_includes_for_type(extended_attributes) |
| @@ -159,8 +168,7 @@ def method_context(interface, method, is_visible=True): |
| return { |
| 'activity_logging_world_list': v8_utilities.activity_logging_world_list(method), # [ActivityLogging] |
| 'arguments': argument_contexts, |
| - 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) |
| - if idl_type.is_explicit_nullable else idl_type.cpp_type), |
| + 'cpp_type': this_cpp_type, |
| 'cpp_value': this_cpp_value, |
| 'cpp_type_initializer': idl_type.cpp_type_initializer, |
| 'deprecate_as': v8_utilities.deprecate_as(method), # [DeprecateAs] |