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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 is_check_security_for_frame = ( | 111 is_check_security_for_frame = ( |
112 has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and | 112 has_extended_attribute_value(interface, 'CheckSecurity', 'Frame') and |
113 not is_do_not_check_security) | 113 not is_do_not_check_security) |
114 | 114 |
115 is_check_security_for_window = ( | 115 is_check_security_for_window = ( |
116 has_extended_attribute_value(interface, 'CheckSecurity', 'Window') and | 116 has_extended_attribute_value(interface, 'CheckSecurity', 'Window') and |
117 not is_do_not_check_security) | 117 not is_do_not_check_security) |
118 | 118 |
119 is_raises_exception = 'RaisesException' in extended_attributes | 119 is_raises_exception = 'RaisesException' in extended_attributes |
120 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca
llEpilogue') | 120 is_custom_call_epilogue = has_extended_attribute_value(method, 'Custom', 'Ca
llEpilogue') |
| 121 is_post_message = 'PostMessage' in extended_attributes |
| 122 if is_post_message: |
| 123 includes.add('bindings/core/v8/PostMessage.h') |
121 | 124 |
122 return { | 125 return { |
123 '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] |
124 'arguments': [argument_context(interface, method, argument, index, is_vi
sible=is_visible) | 127 'arguments': [argument_context(interface, method, argument, index, is_vi
sible=is_visible) |
125 for index, argument in enumerate(arguments)], | 128 for index, argument in enumerate(arguments)], |
126 'argument_declarations_for_private_script': | 129 'argument_declarations_for_private_script': |
127 argument_declarations_for_private_script(interface, method), | 130 argument_declarations_for_private_script(interface, method), |
128 'conditional_string': v8_utilities.conditional_string(method), | 131 'conditional_string': v8_utilities.conditional_string(method), |
129 '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) |
130 if idl_type.is_explicit_nullable else idl_type.cpp_type), | 133 if idl_type.is_explicit_nullable else idl_type.cpp_type), |
(...skipping 28 matching lines...) Expand all Loading... |
159 'is_custom': 'Custom' in extended_attributes and not is_custom_call_epil
ogue, | 162 'is_custom': 'Custom' in extended_attributes and not is_custom_call_epil
ogue, |
160 'is_custom_call_epilogue': is_custom_call_epilogue, | 163 'is_custom_call_epilogue': is_custom_call_epilogue, |
161 'is_custom_element_callbacks': is_custom_element_callbacks, | 164 'is_custom_element_callbacks': is_custom_element_callbacks, |
162 'is_do_not_check_security': is_do_not_check_security, | 165 'is_do_not_check_security': is_do_not_check_security, |
163 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute
s, | 166 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute
s, |
164 'is_explicit_nullable': idl_type.is_explicit_nullable, | 167 'is_explicit_nullable': idl_type.is_explicit_nullable, |
165 'is_implemented_in_private_script': is_implemented_in_private_script, | 168 'is_implemented_in_private_script': is_implemented_in_private_script, |
166 'is_partial_interface_member': | 169 'is_partial_interface_member': |
167 'PartialInterfaceImplementedAs' in extended_attributes, | 170 'PartialInterfaceImplementedAs' in extended_attributes, |
168 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, | 171 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, |
| 172 'is_post_message': is_post_message, |
169 'is_raises_exception': is_raises_exception, | 173 'is_raises_exception': is_raises_exception, |
170 'is_read_only': is_unforgeable(interface, method), | 174 'is_read_only': is_unforgeable(interface, method), |
171 'is_static': is_static, | 175 'is_static': is_static, |
172 'is_variadic': arguments and arguments[-1].is_variadic, | 176 'is_variadic': arguments and arguments[-1].is_variadic, |
173 'measure_as': v8_utilities.measure_as(method, interface), # [MeasureAs] | 177 'measure_as': v8_utilities.measure_as(method, interface), # [MeasureAs] |
174 'name': name, | 178 'name': name, |
175 'number_of_arguments': len(arguments), | 179 'number_of_arguments': len(arguments), |
176 'number_of_required_arguments': len([ | 180 'number_of_required_arguments': len([ |
177 argument for argument in arguments | 181 argument for argument in arguments |
178 if not (argument.is_optional or argument.is_variadic)]), | 182 if not (argument.is_optional or argument.is_variadic)]), |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 return method.idl_type and method.idl_type.name == 'Promise' | 458 return method.idl_type and method.idl_type.name == 'Promise' |
455 | 459 |
456 IdlOperation.returns_promise = property(method_returns_promise) | 460 IdlOperation.returns_promise = property(method_returns_promise) |
457 | 461 |
458 | 462 |
459 def argument_conversion_needs_exception_state(method, argument): | 463 def argument_conversion_needs_exception_state(method, argument): |
460 idl_type = argument.idl_type | 464 idl_type = argument.idl_type |
461 return (idl_type.v8_conversion_needs_exception_state or | 465 return (idl_type.v8_conversion_needs_exception_state or |
462 argument.is_variadic or | 466 argument.is_variadic or |
463 (method.returns_promise and idl_type.is_string_type)) | 467 (method.returns_promise and idl_type.is_string_type)) |
OLD | NEW |