| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 includes.add('platform/ScriptForbiddenScope.h') | 87 includes.add('platform/ScriptForbiddenScope.h') |
| 88 | 88 |
| 89 # [OnlyExposedToPrivateScript] | 89 # [OnlyExposedToPrivateScript] |
| 90 is_only_exposed_to_private_script = 'OnlyExposedToPrivateScript' in extended
_attributes | 90 is_only_exposed_to_private_script = 'OnlyExposedToPrivateScript' in extended
_attributes |
| 91 | 91 |
| 92 is_call_with_script_arguments = has_extended_attribute_value(method, 'CallWi
th', 'ScriptArguments') | 92 is_call_with_script_arguments = has_extended_attribute_value(method, 'CallWi
th', 'ScriptArguments') |
| 93 if is_call_with_script_arguments: | 93 if is_call_with_script_arguments: |
| 94 includes.update(['bindings/core/v8/ScriptCallStackFactory.h', | 94 includes.update(['bindings/core/v8/ScriptCallStackFactory.h', |
| 95 'core/inspector/ScriptArguments.h']) | 95 'core/inspector/ScriptArguments.h']) |
| 96 is_call_with_script_state = has_extended_attribute_value(method, 'CallWith',
'ScriptState') | 96 is_call_with_script_state = has_extended_attribute_value(method, 'CallWith',
'ScriptState') |
| 97 if is_call_with_script_state: | 97 is_call_with_this_value = has_extended_attribute_value(method, 'CallWith', '
ThisValue') |
| 98 if is_call_with_script_state or is_call_with_this_value: |
| 98 includes.add('bindings/core/v8/ScriptState.h') | 99 includes.add('bindings/core/v8/ScriptState.h') |
| 99 is_check_security_for_node = 'CheckSecurity' in extended_attributes | 100 is_check_security_for_node = 'CheckSecurity' in extended_attributes |
| 100 if is_check_security_for_node: | 101 if is_check_security_for_node: |
| 101 includes.add('bindings/core/v8/BindingSecurity.h') | 102 includes.add('bindings/core/v8/BindingSecurity.h') |
| 102 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s | 103 is_custom_element_callbacks = 'CustomElementCallbacks' in extended_attribute
s |
| 103 if is_custom_element_callbacks: | 104 if is_custom_element_callbacks: |
| 104 includes.add('core/dom/custom/CustomElementProcessingStack.h') | 105 includes.add('core/dom/custom/CustomElementProcessingStack.h') |
| 105 | 106 |
| 106 is_do_not_check_security = 'DoNotCheckSecurity' in extended_attributes | 107 is_do_not_check_security = 'DoNotCheckSecurity' in extended_attributes |
| 107 | 108 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 is_raises_exception or | 143 is_raises_exception or |
| 143 is_check_security_for_frame or | 144 is_check_security_for_frame or |
| 144 is_check_security_for_window or | 145 is_check_security_for_window or |
| 145 any(argument for argument in arguments | 146 any(argument for argument in arguments |
| 146 if (argument.idl_type.name == 'SerializedScriptValue' or | 147 if (argument.idl_type.name == 'SerializedScriptValue' or |
| 147 argument_conversion_needs_exception_state(method, argument))
), | 148 argument_conversion_needs_exception_state(method, argument))
), |
| 148 'idl_type': idl_type.base_type, | 149 'idl_type': idl_type.base_type, |
| 149 'is_call_with_execution_context': has_extended_attribute_value(method, '
CallWith', 'ExecutionContext'), | 150 'is_call_with_execution_context': has_extended_attribute_value(method, '
CallWith', 'ExecutionContext'), |
| 150 'is_call_with_script_arguments': is_call_with_script_arguments, | 151 'is_call_with_script_arguments': is_call_with_script_arguments, |
| 151 'is_call_with_script_state': is_call_with_script_state, | 152 'is_call_with_script_state': is_call_with_script_state, |
| 153 'is_call_with_this_value': is_call_with_this_value, |
| 152 'is_check_security_for_frame': is_check_security_for_frame, | 154 'is_check_security_for_frame': is_check_security_for_frame, |
| 153 'is_check_security_for_node': is_check_security_for_node, | 155 'is_check_security_for_node': is_check_security_for_node, |
| 154 'is_check_security_for_window': is_check_security_for_window, | 156 'is_check_security_for_window': is_check_security_for_window, |
| 155 'is_custom': 'Custom' in extended_attributes and not is_custom_call_epil
ogue, | 157 'is_custom': 'Custom' in extended_attributes and not is_custom_call_epil
ogue, |
| 156 'is_custom_call_epilogue': is_custom_call_epilogue, | 158 'is_custom_call_epilogue': is_custom_call_epilogue, |
| 157 'is_custom_element_callbacks': is_custom_element_callbacks, | 159 'is_custom_element_callbacks': is_custom_element_callbacks, |
| 158 'is_do_not_check_security': is_do_not_check_security, | 160 'is_do_not_check_security': is_do_not_check_security, |
| 159 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute
s, | 161 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute
s, |
| 160 'is_explicit_nullable': idl_type.is_explicit_nullable, | 162 'is_explicit_nullable': idl_type.is_explicit_nullable, |
| 161 'is_implemented_in_private_script': is_implemented_in_private_script, | 163 'is_implemented_in_private_script': is_implemented_in_private_script, |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 | 452 |
| 451 IdlOperation.returns_promise = property(method_returns_promise) | 453 IdlOperation.returns_promise = property(method_returns_promise) |
| 452 | 454 |
| 453 | 455 |
| 454 def argument_conversion_needs_exception_state(method, argument): | 456 def argument_conversion_needs_exception_state(method, argument): |
| 455 idl_type = argument.idl_type | 457 idl_type = argument.idl_type |
| 456 return (idl_type.v8_conversion_needs_exception_state or | 458 return (idl_type.v8_conversion_needs_exception_state or |
| 457 argument.is_variadic or | 459 argument.is_variadic or |
| 458 (method.returns_promise and (idl_type.is_string_type or | 460 (method.returns_promise and (idl_type.is_string_type or |
| 459 idl_type.is_enum))) | 461 idl_type.is_enum))) |
| OLD | NEW |