Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(103)

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/v8_interface.py

Issue 1917883002: Remove TraceWrappers idl attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 'idl_type': set_wrapper_reference_to_argument.idl_type, 143 'idl_type': set_wrapper_reference_to_argument.idl_type,
144 'v8_type': v8_types.v8_type(set_wrapper_reference_to_argument.idl_ty pe.name), 144 'v8_type': v8_types.v8_type(set_wrapper_reference_to_argument.idl_ty pe.name),
145 } 145 }
146 set_wrapper_reference_to['idl_type'].add_includes_for_type() 146 set_wrapper_reference_to['idl_type'].add_includes_for_type()
147 147
148 # [Custom=VisitDOMWrapper] 148 # [Custom=VisitDOMWrapper]
149 has_visit_dom_wrapper = ( 149 has_visit_dom_wrapper = (
150 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or 150 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or
151 set_wrapper_reference_from or set_wrapper_reference_to) 151 set_wrapper_reference_from or set_wrapper_reference_to)
152 152
153 # [TraceWrappers]
154 trace_wrappers = extended_attribute_value_as_list(interface, 'TraceWrappers' )
155 if trace_wrappers:
156 includes.add('bindings/core/v8/ScriptWrappableVisitor.h')
157
158 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod e') else 'ObjectClassId') 153 wrapper_class_id = ('NodeClassId' if inherits_interface(interface.name, 'Nod e') else 'ObjectClassId')
159 154
160 v8_class_name = v8_utilities.v8_class_name(interface) 155 v8_class_name = v8_utilities.v8_class_name(interface)
161 cpp_class_name = cpp_name(interface) 156 cpp_class_name = cpp_name(interface)
162 cpp_class_name_or_partial = cpp_name_or_partial(interface) 157 cpp_class_name_or_partial = cpp_name_or_partial(interface)
163 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface) 158 v8_class_name_or_partial = v8_utilities.v8_class_name_or_partial(interface)
164 159
165 context = { 160 context = {
166 'cpp_class': cpp_class_name, 161 'cpp_class': cpp_class_name,
167 'cpp_class_or_partial': cpp_class_name_or_partial, 162 'cpp_class_or_partial': cpp_class_name_or_partial,
168 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget', 163 'event_target_inheritance': 'InheritFromEventTarget' if is_event_target else 'NotInheritFromEventTarget',
169 'is_gc_type': True, 164 'is_gc_type': True,
170 # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699 165 # FIXME: Remove 'EventTarget' special handling, http://crbug.com/383699
171 'has_access_check_callbacks': (is_check_security and 166 'has_access_check_callbacks': (is_check_security and
172 interface.name != 'EventTarget'), 167 interface.name != 'EventTarget'),
173 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] 168 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction]
174 'has_partial_interface': len(interface.partial_interfaces) > 0, 169 'has_partial_interface': len(interface.partial_interfaces) > 0,
175 'has_visit_dom_wrapper': has_visit_dom_wrapper, 170 'has_visit_dom_wrapper': has_visit_dom_wrapper,
176 'trace_wrappers': trace_wrappers,
177 'header_includes': header_includes, 171 'header_includes': header_includes,
178 'interface_name': interface.name, 172 'interface_name': interface.name,
179 'is_array_buffer_or_view': is_array_buffer_or_view, 173 'is_array_buffer_or_view': is_array_buffer_or_view,
180 'is_check_security': is_check_security, 174 'is_check_security': is_check_security,
181 'is_event_target': is_event_target, 175 'is_event_target': is_event_target,
182 'is_exception': interface.is_exception, 176 'is_exception': interface.is_exception,
183 'is_global': is_global, 177 'is_global': is_global,
184 'is_node': inherits_interface(interface.name, 'Node'), 178 'is_node': inherits_interface(interface.name, 'Node'),
185 'is_partial': interface.is_partial, 179 'is_partial': interface.is_partial,
186 'is_typed_array_type': is_typed_array_type, 180 'is_typed_array_type': is_typed_array_type,
187 'lifetime': 'Dependent' if (has_visit_dom_wrapper or trace_wrappers or i s_dependent_lifetime) else 'Independent', 181 'lifetime': 'Dependent' if (has_visit_dom_wrapper or is_dependent_lifeti me) else 'Independent',
188 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] 182 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs]
189 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(interface, None), 183 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(interface, None),
190 'parent_interface': parent_interface, 184 'parent_interface': parent_interface,
191 'pass_cpp_type': cpp_name(interface) + '*', 185 'pass_cpp_type': cpp_name(interface) + '*',
192 'active_scriptwrappable': active_scriptwrappable, 186 'active_scriptwrappable': active_scriptwrappable,
193 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled] 187 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled]
194 'set_wrapper_reference_from': set_wrapper_reference_from, 188 'set_wrapper_reference_from': set_wrapper_reference_from,
195 'set_wrapper_reference_to': set_wrapper_reference_to, 189 'set_wrapper_reference_to': set_wrapper_reference_to,
196 'v8_class': v8_class_name, 190 'v8_class': v8_class_name,
197 'v8_class_or_partial': v8_class_name_or_partial, 191 'v8_class_or_partial': v8_class_name_or_partial,
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 1378
1385 extended_attributes = deleter.extended_attributes 1379 extended_attributes = deleter.extended_attributes
1386 idl_type = deleter.idl_type 1380 idl_type = deleter.idl_type
1387 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1381 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1388 return { 1382 return {
1389 'is_call_with_script_state': is_call_with_script_state, 1383 'is_call_with_script_state': is_call_with_script_state,
1390 'is_custom': 'Custom' in extended_attributes, 1384 'is_custom': 'Custom' in extended_attributes,
1391 'is_raises_exception': 'RaisesException' in extended_attributes, 1385 'is_raises_exception': 'RaisesException' in extended_attributes,
1392 'name': cpp_name(deleter), 1386 'name': cpp_name(deleter),
1393 } 1387 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698