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 2fcb88633c3a5af04ddc72f54677fba89e3ac992..472fbd91539f35ce51f1c8890e36dff66383d522 100644 |
| --- a/Source/bindings/scripts/v8_methods.py |
| +++ b/Source/bindings/scripts/v8_methods.py |
| @@ -191,6 +191,7 @@ def argument_context(interface, method, argument, index): |
| idl_type = argument.idl_type |
| this_cpp_value = cpp_value(interface, method, index) |
| is_variadic_wrapper_type = argument.is_variadic and idl_type.is_wrapper_type |
| + type_checking_interface = (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and idl_type.is_wrapper_type |
|
Jens Widell
2014/10/02 12:18:14
Please wrap the line (like it used to be wrapped w
|
| if ('ImplementedInPrivateScript' in extended_attributes and |
| not idl_type.is_wrapper_type and |
| @@ -209,10 +210,7 @@ def argument_context(interface, method, argument, index): |
| 'handle': '%sHandle' % argument.name, |
| # FIXME: remove once [Default] removed and just use argument.default_value |
| 'has_default': 'Default' in extended_attributes or default_cpp_value, |
| - 'has_type_checking_interface': |
| - (has_extended_attribute_value(interface, 'TypeChecking', 'Interface') or |
| - has_extended_attribute_value(method, 'TypeChecking', 'Interface')) and |
| - idl_type.is_wrapper_type, |
| + 'has_type_checking_interface': type_checking_interface, |
|
haraken
2014/10/02 11:52:56
Can we rename this to needs_type_check ?
|
| 'has_type_checking_unrestricted': |
| (has_extended_attribute_value(interface, 'TypeChecking', 'Unrestricted') or |
| has_extended_attribute_value(method, 'TypeChecking', 'Unrestricted')) and |
| @@ -234,7 +232,7 @@ def argument_context(interface, method, argument, index): |
| creation_context='scriptState->context()->Global()'), |
| 'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value), |
| 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name, method, this_cpp_value, for_main_world=True), |
| - 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, index, return_promise=method.returns_promise), |
| + 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, index, type_checking_interface, return_promise=method.returns_promise), |
| 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc_type), |
| } |
| @@ -362,14 +360,14 @@ def v8_value_to_local_cpp_variadic_value(argument, index, return_promise): |
| return '%s%s(%s)' % (macro, suffix, ', '.join(macro_args)) |
| -def v8_value_to_local_cpp_value(argument, index, return_promise=False): |
| +def v8_value_to_local_cpp_value(argument, index, type_checked, return_promise=False): |
| extended_attributes = argument.extended_attributes |
| idl_type = argument.idl_type |
| name = argument.name |
| if argument.is_variadic: |
| return v8_value_to_local_cpp_variadic_value(argument, index, return_promise) |
| return idl_type.v8_value_to_local_cpp_value(extended_attributes, 'info[%s]' % index, |
| - name, index=index, declare_variable=False, return_promise=return_promise) |
| + name, type_checked, index=index, declare_variable=False, return_promise=return_promise) |
|
Jens Widell
2014/10/02 12:18:14
Please pass the new argument as a keyword argument
|
| ################################################################################ |