Chromium Code Reviews| Index: Source/bindings/scripts/v8_methods.py |
| diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py |
| index 0458c4b8de25c469dc9d3c581d1c9677e2ebdca4..f27f302adbbcd9f384fe103ce8944d37b26881fa 100644 |
| --- a/Source/bindings/scripts/v8_methods.py |
| +++ b/Source/bindings/scripts/v8_methods.py |
| @@ -180,7 +180,7 @@ def generate_argument(interface, method, argument, index): |
| # Value handling |
| ################################################################################ |
| -def cpp_value(interface, method, number_of_arguments): |
| +def cpp_value(interface, method, number_of_arguments, for_constructor=False): |
|
Nils Barth (inactive)
2014/04/09 02:00:27
I don't think for_constructor is necessary:
you ca
sof
2014/04/09 07:31:59
'method' is an IdlOperation/IdlAttribute/.. object
Nils Barth (inactive)
2014/04/09 09:36:38
Got it!
|
| def cpp_argument(argument): |
| idl_type = argument.idl_type |
| if idl_type.name == 'EventListener': |
| @@ -206,14 +206,17 @@ def cpp_value(interface, method, number_of_arguments): |
| not method.is_static): |
| cpp_arguments.append('*impl') |
| cpp_arguments.extend(cpp_argument(argument) for argument in arguments) |
| - this_union_arguments = method.idl_type.union_arguments |
| + this_union_arguments = method.idl_type and method.idl_type.union_arguments |
| if this_union_arguments: |
| cpp_arguments.extend(this_union_arguments) |
| if 'RaisesException' in method.extended_attributes: |
| cpp_arguments.append('exceptionState') |
| - cpp_method_name = v8_utilities.scoped_name(interface, method, v8_utilities.cpp_name(method)) |
| + if for_constructor: |
| + cpp_method_name = "%s::create" % v8_utilities.cpp_name(interface) |
|
Nils Barth (inactive)
2014/04/09 02:00:27
I think you can push this into v8_utilities.scoped
sof
2014/04/09 07:31:59
For the same reasons as the above comment, attribu
|
| + else: |
| + cpp_method_name = v8_utilities.scoped_name(interface, method, v8_utilities.cpp_name(method)) |
| return '%s(%s)' % (cpp_method_name, ', '.join(cpp_arguments)) |