Chromium Code Reviews| Index: Source/bindings/scripts/v8_interface.py |
| diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py |
| index 405ada7b874bb1bbc7999c93a270bd2c77f6e927..4a33f8d5d7d5d4b4c0511d38b9e7a43e96eb8f1f 100644 |
| --- a/Source/bindings/scripts/v8_interface.py |
| +++ b/Source/bindings/scripts/v8_interface.py |
| @@ -464,10 +464,14 @@ def overload_check_argument(index, argument): |
| # [Constructor] |
| def generate_constructor(interface, constructor): |
| + generated_arguments = [constructor_argument(interface, constructor, argument, index) |
| + for index, argument in enumerate(constructor.arguments)] |
| + |
| return { |
| 'argument_list': constructor_argument_list(interface, constructor), |
| - 'arguments': [constructor_argument(interface, constructor, argument, index) |
| - for index, argument in enumerate(constructor.arguments)], |
| + 'arguments': generated_arguments, |
| + 'arguments_need_try_catch': any( |
| + v8_methods.argument_needs_try_catch(argument) for argument in generated_arguments), |
|
Nils Barth (inactive)
2014/05/07 03:02:19
Could you add one more linebreak here?
(So for ...
|
| 'cpp_type': cpp_template_type( |
| cpp_ptr_type('RefPtr', 'RawPtr', gc_type(interface)), |
| cpp_name(interface)), |
| @@ -504,8 +508,14 @@ def constructor_argument_list(interface, constructor): |
| def constructor_argument(interface, constructor, argument, index): |
| + extended_attributes = argument.extended_attributes |
| idl_type = argument.idl_type |
| + is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type |
| + |
| return { |
| + 'cpp_type': idl_type.cpp_type_args(extended_attributes=extended_attributes, |
| + used_as_argument=not is_variadic_wrapper_type, |
| + used_in_cpp_sequence=is_variadic_wrapper_type), |
| 'cpp_value': |
| v8_methods.cpp_value(interface, constructor, index), |
| 'has_default': 'Default' in argument.extended_attributes, |