| OLD | NEW |
| 1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 if 'LenientThis' in extended_attributes: | 122 if 'LenientThis' in extended_attributes: |
| 123 raise Exception('[LenientThis] is not supported for operations.') | 123 raise Exception('[LenientThis] is not supported for operations.') |
| 124 | 124 |
| 125 argument_contexts = [ | 125 argument_contexts = [ |
| 126 argument_context(interface, method, argument, index, is_visible=is_visib
le) | 126 argument_context(interface, method, argument, index, is_visible=is_visib
le) |
| 127 for index, argument in enumerate(arguments)] | 127 for index, argument in enumerate(arguments)] |
| 128 | 128 |
| 129 return { | 129 return { |
| 130 'activity_logging_world_list': v8_utilities.activity_logging_world_list(
method), # [ActivityLogging] | 130 'activity_logging_world_list': v8_utilities.activity_logging_world_list(
method), # [ActivityLogging] |
| 131 'api_experiment_inherited_enabled': v8_utilities.api_experiment_enabled_
function(interface), # [APIExperimentEnabled] |
| 132 'api_experiment_enabled': v8_utilities.api_experiment_enabled_function(m
ethod), # [APIExperimentEnabled] |
| 131 'arguments': argument_contexts, | 133 'arguments': argument_contexts, |
| 132 'argument_declarations_for_private_script': | 134 'argument_declarations_for_private_script': |
| 133 argument_declarations_for_private_script(interface, method), | 135 argument_declarations_for_private_script(interface, method), |
| 134 'conditional_string': conditional_string, | 136 'conditional_string': conditional_string, |
| 135 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) | 137 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) |
| 136 if idl_type.is_explicit_nullable else idl_type.cpp_type), | 138 if idl_type.is_explicit_nullable else idl_type.cpp_type), |
| 137 'cpp_value': this_cpp_value, | 139 'cpp_value': this_cpp_value, |
| 138 'cpp_type_initializer': idl_type.cpp_type_initializer, | 140 'cpp_type_initializer': idl_type.cpp_type_initializer, |
| 139 'custom_registration_extended_attributes': | 141 'custom_registration_extended_attributes': |
| 140 CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES.intersection( | 142 CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES.intersection( |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 477 return method.idl_type and method.idl_type.name == 'Promise' | 479 return method.idl_type and method.idl_type.name == 'Promise' |
| 478 | 480 |
| 479 IdlOperation.returns_promise = property(method_returns_promise) | 481 IdlOperation.returns_promise = property(method_returns_promise) |
| 480 | 482 |
| 481 | 483 |
| 482 def argument_conversion_needs_exception_state(method, argument): | 484 def argument_conversion_needs_exception_state(method, argument): |
| 483 idl_type = argument.idl_type | 485 idl_type = argument.idl_type |
| 484 return (idl_type.v8_conversion_needs_exception_state or | 486 return (idl_type.v8_conversion_needs_exception_state or |
| 485 argument.is_variadic or | 487 argument.is_variadic or |
| 486 (method.returns_promise and idl_type.is_string_type)) | 488 (method.returns_promise and idl_type.is_string_type)) |
| OLD | NEW |