OLD | NEW |
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 # 'cpp_type': argument.idl_type.cpp_type_args(raw_type=True), | 156 # 'cpp_type': argument.idl_type.cpp_type_args(raw_type=True), |
157 # (if type is non-wrapper type like NodeFilter, normally RefPtr) | 157 # (if type is non-wrapper type like NodeFilter, normally RefPtr) |
158 # Raw pointers faster though, and NodeFilter hacky anyway. | 158 # Raw pointers faster though, and NodeFilter hacky anyway. |
159 'cpp_type': argument.idl_type.implemented_as + '*', | 159 'cpp_type': argument.idl_type.implemented_as + '*', |
160 'idl_type': argument.idl_type, | 160 'idl_type': argument.idl_type, |
161 'v8_type': v8_types.v8_type(argument.idl_type.name), | 161 'v8_type': v8_types.v8_type(argument.idl_type.name), |
162 } for argument in extended_attributes.get('SetWrapperReferenceTo', [])] | 162 } for argument in extended_attributes.get('SetWrapperReferenceTo', [])] |
163 for set_wrapper_reference_to in set_wrapper_reference_to_list: | 163 for set_wrapper_reference_to in set_wrapper_reference_to_list: |
164 set_wrapper_reference_to['idl_type'].add_includes_for_type() | 164 set_wrapper_reference_to['idl_type'].add_includes_for_type() |
165 | 165 |
166 # [NotScriptWrappable] | |
167 is_script_wrappable = 'NotScriptWrappable' not in extended_attributes | |
168 | |
169 # [SetWrapperReferenceFrom] | 166 # [SetWrapperReferenceFrom] |
170 has_visit_dom_wrapper = ( | 167 has_visit_dom_wrapper = ( |
171 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or | 168 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or |
172 reachable_node_function or | 169 reachable_node_function or |
173 set_wrapper_reference_to_list) | 170 set_wrapper_reference_to_list) |
174 | 171 |
175 this_gc_type = gc_type(interface) | 172 this_gc_type = gc_type(interface) |
176 | 173 |
177 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod
e') else 'ObjectClassId') | 174 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod
e') else 'ObjectClassId') |
178 | 175 |
(...skipping 18 matching lines...) Expand all Loading... |
197 'header_includes': header_includes, | 194 'header_includes': header_includes, |
198 'interface_name': interface.name, | 195 'interface_name': interface.name, |
199 'is_active_dom_object': is_active_dom_object, | 196 'is_active_dom_object': is_active_dom_object, |
200 'is_array_buffer_or_view': is_array_buffer_or_view, | 197 'is_array_buffer_or_view': is_array_buffer_or_view, |
201 'is_check_security': is_check_security, | 198 'is_check_security': is_check_security, |
202 'is_dependent_lifetime': is_dependent_lifetime, | 199 'is_dependent_lifetime': is_dependent_lifetime, |
203 'is_event_target': is_event_target, | 200 'is_event_target': is_event_target, |
204 'is_exception': interface.is_exception, | 201 'is_exception': interface.is_exception, |
205 'is_node': inherits_interface(interface.name, 'Node'), | 202 'is_node': inherits_interface(interface.name, 'Node'), |
206 'is_partial': interface.is_partial, | 203 'is_partial': interface.is_partial, |
207 'is_script_wrappable': is_script_wrappable, | |
208 'is_typed_array_type': is_typed_array_type, | 204 'is_typed_array_type': is_typed_array_type, |
209 'iterator_method': iterator_method, | 205 'iterator_method': iterator_method, |
210 'lifetime': 'Dependent' | 206 'lifetime': 'Dependent' |
211 if (has_visit_dom_wrapper or | 207 if (has_visit_dom_wrapper or |
212 is_active_dom_object or | 208 is_active_dom_object or |
213 is_dependent_lifetime) | 209 is_dependent_lifetime) |
214 else 'Independent', | 210 else 'Independent', |
215 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] | 211 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] |
216 'parent_interface': parent_interface, | 212 'parent_interface': parent_interface, |
217 'pass_cpp_type': cpp_template_type( | 213 'pass_cpp_type': cpp_template_type( |
(...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 deleter = next( | 1235 deleter = next( |
1240 method | 1236 method |
1241 for method in interface.operations | 1237 for method in interface.operations |
1242 if ('deleter' in method.specials and | 1238 if ('deleter' in method.specials and |
1243 len(method.arguments) == 1 and | 1239 len(method.arguments) == 1 and |
1244 str(method.arguments[0].idl_type) == 'DOMString')) | 1240 str(method.arguments[0].idl_type) == 'DOMString')) |
1245 except StopIteration: | 1241 except StopIteration: |
1246 return None | 1242 return None |
1247 | 1243 |
1248 return property_deleter(deleter) | 1244 return property_deleter(deleter) |
OLD | NEW |