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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 # [CheckSecurity] | 94 # [CheckSecurity] |
95 is_do_not_check_security = 'DoNotCheckSecurity' in extended_attributes | 95 is_do_not_check_security = 'DoNotCheckSecurity' in extended_attributes |
96 is_check_security_for_receiver = ( | 96 is_check_security_for_receiver = ( |
97 has_extended_attribute_value(interface, 'CheckSecurity', 'Receiver') and | 97 has_extended_attribute_value(interface, 'CheckSecurity', 'Receiver') and |
98 not is_do_not_check_security) | 98 not is_do_not_check_security) |
99 is_check_security_for_return_value = ( | 99 is_check_security_for_return_value = ( |
100 has_extended_attribute_value(method, 'CheckSecurity', 'ReturnValue')) | 100 has_extended_attribute_value(method, 'CheckSecurity', 'ReturnValue')) |
101 if is_check_security_for_receiver or is_check_security_for_return_value: | 101 if is_check_security_for_receiver or is_check_security_for_return_value: |
102 includes.add('bindings/core/v8/BindingSecurity.h') | 102 includes.add('bindings/core/v8/BindingSecurity.h') |
103 | 103 |
| 104 is_ce_reactions = 'CEReactions' in extended_attributes |
| 105 if is_ce_reactions: |
| 106 includes.add('core/dom/custom/CEReactionsScope.h') |
104 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s | 107 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s |
105 if is_custom_element_callbacks: | 108 if is_custom_element_callbacks: |
106 includes.add('core/dom/custom/V0CustomElementProcessingStack.h') | 109 includes.add('core/dom/custom/V0CustomElementProcessingStack.h') |
107 | 110 |
108 is_raises_exception = 'RaisesException' in extended_attributes | 111 is_raises_exception = 'RaisesException' in extended_attributes |
109 is_custom_call_prologue = has_extended_attribute_value(method, 'Custom', 'Ca
llPrologue') | 112 is_custom_call_prologue = has_extended_attribute_value(method, 'Custom', 'Ca
llPrologue') |
110 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca
llEpilogue') | 113 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca
llEpilogue') |
111 is_post_message = 'PostMessage' in extended_attributes | 114 is_post_message = 'PostMessage' in extended_attributes |
112 if is_post_message: | 115 if is_post_message: |
113 includes.add('bindings/core/v8/SerializedScriptValueFactory.h') | 116 includes.add('bindings/core/v8/SerializedScriptValueFactory.h') |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 if (argument.idl_type.name == 'SerializedScriptValue' or | 150 if (argument.idl_type.name == 'SerializedScriptValue' or |
148 argument_conversion_needs_exception_state(method, argument))
), | 151 argument_conversion_needs_exception_state(method, argument))
), |
149 'has_optional_argument_without_default_value': | 152 'has_optional_argument_without_default_value': |
150 any(True for argument_context in argument_contexts | 153 any(True for argument_context in argument_contexts |
151 if argument_context['is_optional_without_default_value']), | 154 if argument_context['is_optional_without_default_value']), |
152 'idl_type': idl_type.base_type, | 155 'idl_type': idl_type.base_type, |
153 'is_call_with_execution_context': has_extended_attribute_value(method, '
CallWith', 'ExecutionContext'), | 156 'is_call_with_execution_context': has_extended_attribute_value(method, '
CallWith', 'ExecutionContext'), |
154 'is_call_with_script_arguments': is_call_with_script_arguments, | 157 'is_call_with_script_arguments': is_call_with_script_arguments, |
155 'is_call_with_script_state': is_call_with_script_state, | 158 'is_call_with_script_state': is_call_with_script_state, |
156 'is_call_with_this_value': is_call_with_this_value, | 159 'is_call_with_this_value': is_call_with_this_value, |
| 160 'is_ce_reactions': is_ce_reactions, |
157 'is_check_security_for_receiver': is_check_security_for_receiver, | 161 'is_check_security_for_receiver': is_check_security_for_receiver, |
158 'is_check_security_for_return_value': is_check_security_for_return_value
, | 162 'is_check_security_for_return_value': is_check_security_for_return_value
, |
159 'is_custom': 'Custom' in extended_attributes and | 163 'is_custom': 'Custom' in extended_attributes and |
160 not (is_custom_call_prologue or is_custom_call_epilogue), | 164 not (is_custom_call_prologue or is_custom_call_epilogue), |
161 'is_custom_call_prologue': is_custom_call_prologue, | 165 'is_custom_call_prologue': is_custom_call_prologue, |
162 'is_custom_call_epilogue': is_custom_call_epilogue, | 166 'is_custom_call_epilogue': is_custom_call_epilogue, |
163 'is_custom_element_callbacks': is_custom_element_callbacks, | 167 'is_custom_element_callbacks': is_custom_element_callbacks, |
164 'is_do_not_check_security': is_do_not_check_security, | 168 'is_do_not_check_security': is_do_not_check_security, |
165 'is_explicit_nullable': idl_type.is_explicit_nullable, | 169 'is_explicit_nullable': idl_type.is_explicit_nullable, |
166 'is_implemented_in_private_script': is_implemented_in_private_script, | 170 'is_implemented_in_private_script': is_implemented_in_private_script, |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 return method.idl_type and method.idl_type.name == 'Promise' | 464 return method.idl_type and method.idl_type.name == 'Promise' |
461 | 465 |
462 IdlOperation.returns_promise = property(method_returns_promise) | 466 IdlOperation.returns_promise = property(method_returns_promise) |
463 | 467 |
464 | 468 |
465 def argument_conversion_needs_exception_state(method, argument): | 469 def argument_conversion_needs_exception_state(method, argument): |
466 idl_type = argument.idl_type | 470 idl_type = argument.idl_type |
467 return (idl_type.v8_conversion_needs_exception_state or | 471 return (idl_type.v8_conversion_needs_exception_state or |
468 argument.is_variadic or | 472 argument.is_variadic or |
469 (method.returns_promise and idl_type.is_string_type)) | 473 (method.returns_promise and idl_type.is_string_type)) |
OLD | NEW |