| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 if 'LenientThis' in extended_attributes: | 118 if 'LenientThis' in extended_attributes: |
| 119 raise Exception('[LenientThis] is not supported for operations.') | 119 raise Exception('[LenientThis] is not supported for operations.') |
| 120 | 120 |
| 121 argument_contexts = [ | 121 argument_contexts = [ |
| 122 argument_context(interface, method, argument, index, is_visible=is_visib
le) | 122 argument_context(interface, method, argument, index, is_visible=is_visib
le) |
| 123 for index, argument in enumerate(arguments)] | 123 for index, argument in enumerate(arguments)] |
| 124 | 124 |
| 125 return { | 125 return { |
| 126 'activity_logging_world_list': v8_utilities.activity_logging_world_list(
method), # [ActivityLogging] | 126 'activity_logging_world_list': v8_utilities.activity_logging_world_list(
method), # [ActivityLogging] |
| 127 'api_experiment_name': v8_utilities.api_experiment_name(method), # [API
ExperimentEnabled] |
| 127 'arguments': argument_contexts, | 128 'arguments': argument_contexts, |
| 128 'argument_declarations_for_private_script': | 129 'argument_declarations_for_private_script': |
| 129 argument_declarations_for_private_script(interface, method), | 130 argument_declarations_for_private_script(interface, method), |
| 130 'conditional_string': v8_utilities.conditional_string(method), | 131 'conditional_string': v8_utilities.conditional_string(method), |
| 131 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) | 132 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) |
| 132 if idl_type.is_explicit_nullable else idl_type.cpp_type), | 133 if idl_type.is_explicit_nullable else idl_type.cpp_type), |
| 133 'cpp_value': this_cpp_value, | 134 'cpp_value': this_cpp_value, |
| 134 'cpp_type_initializer': idl_type.cpp_type_initializer, | 135 'cpp_type_initializer': idl_type.cpp_type_initializer, |
| 135 'custom_registration_extended_attributes': | 136 'custom_registration_extended_attributes': |
| 136 CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES.intersection( | 137 CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES.intersection( |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 return method.idl_type and method.idl_type.name == 'Promise' | 474 return method.idl_type and method.idl_type.name == 'Promise' |
| 474 | 475 |
| 475 IdlOperation.returns_promise = property(method_returns_promise) | 476 IdlOperation.returns_promise = property(method_returns_promise) |
| 476 | 477 |
| 477 | 478 |
| 478 def argument_conversion_needs_exception_state(method, argument): | 479 def argument_conversion_needs_exception_state(method, argument): |
| 479 idl_type = argument.idl_type | 480 idl_type = argument.idl_type |
| 480 return (idl_type.v8_conversion_needs_exception_state or | 481 return (idl_type.v8_conversion_needs_exception_state or |
| 481 argument.is_variadic or | 482 argument.is_variadic or |
| 482 (method.returns_promise and idl_type.is_string_type)) | 483 (method.returns_promise and idl_type.is_string_type)) |
| OLD | NEW |