| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 is_check_security_for_frame = ( | 108 is_check_security_for_frame = ( |
| 109 has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and | 109 has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and |
| 110 not is_do_not_check_security) | 110 not is_do_not_check_security) |
| 111 | 111 |
| 112 is_check_security_for_window = ( | 112 is_check_security_for_window = ( |
| 113 has_extended_attribute_value(interface, 'CheckSecurity', 'Window') and | 113 has_extended_attribute_value(interface, 'CheckSecurity', 'Window') and |
| 114 not is_do_not_check_security) | 114 not is_do_not_check_security) |
| 115 | 115 |
| 116 is_raises_exception = 'RaisesException' in extended_attributes | 116 is_raises_exception = 'RaisesException' in extended_attributes |
| 117 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca
llEpilogue') |
| 117 | 118 |
| 118 return { | 119 return { |
| 119 'activity_logging_world_list': v8_utilities.activity_logging_world_list(
method), # [ActivityLogging] | 120 'activity_logging_world_list': v8_utilities.activity_logging_world_list(
method), # [ActivityLogging] |
| 120 'arguments': [argument_context(interface, method, argument, index) | 121 'arguments': [argument_context(interface, method, argument, index) |
| 121 for index, argument in enumerate(arguments)], | 122 for index, argument in enumerate(arguments)], |
| 122 'argument_declarations_for_private_script': | 123 'argument_declarations_for_private_script': |
| 123 argument_declarations_for_private_script(interface, method), | 124 argument_declarations_for_private_script(interface, method), |
| 124 'conditional_string': v8_utilities.conditional_string(method), | 125 'conditional_string': v8_utilities.conditional_string(method), |
| 125 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) | 126 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) |
| 126 if idl_type.is_explicit_nullable else idl_type.cpp_type), | 127 if idl_type.is_explicit_nullable else idl_type.cpp_type), |
| (...skipping 17 matching lines...) Expand all Loading... |
| 144 any(argument for argument in arguments | 145 any(argument for argument in arguments |
| 145 if (argument.idl_type.name == 'SerializedScriptValue' or | 146 if (argument.idl_type.name == 'SerializedScriptValue' or |
| 146 argument_conversion_needs_exception_state(method, argument))
), | 147 argument_conversion_needs_exception_state(method, argument))
), |
| 147 'idl_type': idl_type.base_type, | 148 'idl_type': idl_type.base_type, |
| 148 'is_call_with_execution_context': has_extended_attribute_value(method, '
CallWith', 'ExecutionContext'), | 149 'is_call_with_execution_context': has_extended_attribute_value(method, '
CallWith', 'ExecutionContext'), |
| 149 'is_call_with_script_arguments': is_call_with_script_arguments, | 150 'is_call_with_script_arguments': is_call_with_script_arguments, |
| 150 'is_call_with_script_state': is_call_with_script_state, | 151 'is_call_with_script_state': is_call_with_script_state, |
| 151 'is_check_security_for_frame': is_check_security_for_frame, | 152 'is_check_security_for_frame': is_check_security_for_frame, |
| 152 'is_check_security_for_node': is_check_security_for_node, | 153 'is_check_security_for_node': is_check_security_for_node, |
| 153 'is_check_security_for_window': is_check_security_for_window, | 154 'is_check_security_for_window': is_check_security_for_window, |
| 154 'is_custom': 'Custom' in extended_attributes, | 155 'is_custom': 'Custom' in extended_attributes and not is_custom_call_epil
ogue, |
| 156 'is_custom_call_epilogue': is_custom_call_epilogue, |
| 155 'is_custom_element_callbacks': is_custom_element_callbacks, | 157 'is_custom_element_callbacks': is_custom_element_callbacks, |
| 156 'is_do_not_check_security': is_do_not_check_security, | 158 'is_do_not_check_security': is_do_not_check_security, |
| 157 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute
s, | 159 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute
s, |
| 158 'is_explicit_nullable': idl_type.is_explicit_nullable, | 160 'is_explicit_nullable': idl_type.is_explicit_nullable, |
| 159 'is_implemented_in_private_script': is_implemented_in_private_script, | 161 'is_implemented_in_private_script': is_implemented_in_private_script, |
| 160 'is_partial_interface_member': | 162 'is_partial_interface_member': |
| 161 'PartialInterfaceImplementedAs' in extended_attributes, | 163 'PartialInterfaceImplementedAs' in extended_attributes, |
| 162 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, | 164 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, |
| 163 'is_raises_exception': is_raises_exception, | 165 'is_raises_exception': is_raises_exception, |
| 164 'is_read_only': is_unforgeable(interface, method), | 166 'is_read_only': is_unforgeable(interface, method), |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 448 | 450 |
| 449 IdlOperation.returns_promise = property(method_returns_promise) | 451 IdlOperation.returns_promise = property(method_returns_promise) |
| 450 | 452 |
| 451 | 453 |
| 452 def argument_conversion_needs_exception_state(method, argument): | 454 def argument_conversion_needs_exception_state(method, argument): |
| 453 idl_type = argument.idl_type | 455 idl_type = argument.idl_type |
| 454 return (idl_type.v8_conversion_needs_exception_state or | 456 return (idl_type.v8_conversion_needs_exception_state or |
| 455 argument.is_variadic or | 457 argument.is_variadic or |
| 456 (method.returns_promise and (idl_type.is_string_type or | 458 (method.returns_promise and (idl_type.is_string_type or |
| 457 idl_type.is_enum))) | 459 idl_type.is_enum))) |
| OLD | NEW |