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

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

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if is_check_security: 113 if is_check_security:
114 includes.add('bindings/core/v8/BindingSecurity.h') 114 includes.add('bindings/core/v8/BindingSecurity.h')
115 115
116 # [DependentLifetime] 116 # [DependentLifetime]
117 is_dependent_lifetime = 'DependentLifetime' in extended_attributes 117 is_dependent_lifetime = 'DependentLifetime' in extended_attributes
118 118
119 # [PrimaryGlobal] and [Global] 119 # [PrimaryGlobal] and [Global]
120 is_global = ('PrimaryGlobal' in extended_attributes or 120 is_global = ('PrimaryGlobal' in extended_attributes or
121 'Global' in extended_attributes) 121 'Global' in extended_attributes)
122 122
123 # [RequiresFinalizer]
124 requires_finalizer = 'RequiresFinalizer' in extended_attributes
125
123 # [SetWrapperReferenceFrom] 126 # [SetWrapperReferenceFrom]
124 set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFro m') 127 set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFro m')
125 if set_wrapper_reference_from: 128 if set_wrapper_reference_from:
126 includes.update(['bindings/core/v8/V8GCController.h', 129 includes.update(['bindings/core/v8/V8GCController.h',
127 'core/dom/Element.h']) 130 'core/dom/Element.h'])
128 131
129 # [SetWrapperReferenceTo] 132 # [SetWrapperReferenceTo]
130 set_wrapper_reference_to_argument = extended_attributes.get('SetWrapperRefer enceTo') 133 set_wrapper_reference_to_argument = extended_attributes.get('SetWrapperRefer enceTo')
131 set_wrapper_reference_to = None 134 set_wrapper_reference_to = None
132 if set_wrapper_reference_to_argument: 135 if set_wrapper_reference_to_argument:
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 'is_node': inherits_interface(interface.name, 'Node'), 188 'is_node': inherits_interface(interface.name, 'Node'),
186 'is_partial': interface.is_partial, 189 'is_partial': interface.is_partial,
187 'is_typed_array_type': is_typed_array_type, 190 'is_typed_array_type': is_typed_array_type,
188 'lifetime': 'Dependent' if (has_visit_dom_wrapper or is_dependent_lifeti me) else 'Independent', 191 'lifetime': 'Dependent' if (has_visit_dom_wrapper or is_dependent_lifeti me) else 'Independent',
189 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] 192 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs]
190 'origin_trial_name': v8_utilities.origin_trial_name(interface), 193 'origin_trial_name': v8_utilities.origin_trial_name(interface),
191 'parent_interface': parent_interface, 194 'parent_interface': parent_interface,
192 'pass_cpp_type': cpp_template_type( 195 'pass_cpp_type': cpp_template_type(
193 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type), 196 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type),
194 cpp_name(interface)), 197 cpp_name(interface)),
198 'requires_finalizer': requires_finalizer,
195 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled] 199 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled]
196 'set_wrapper_reference_from': set_wrapper_reference_from, 200 'set_wrapper_reference_from': set_wrapper_reference_from,
197 'set_wrapper_reference_to': set_wrapper_reference_to, 201 'set_wrapper_reference_to': set_wrapper_reference_to,
198 'v8_class': v8_class_name, 202 'v8_class': v8_class_name,
199 'v8_class_or_partial': v8_class_name_or_partial, 203 'v8_class_or_partial': v8_class_name_or_partial,
200 'wrapper_class_id': wrapper_class_id, 204 'wrapper_class_id': wrapper_class_id,
201 } 205 }
202 206
203 # Constructors 207 # Constructors
204 constructors = [constructor_context(interface, constructor) 208 constructors = [constructor_context(interface, constructor)
(...skipping 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after
1395 1399
1396 extended_attributes = deleter.extended_attributes 1400 extended_attributes = deleter.extended_attributes
1397 idl_type = deleter.idl_type 1401 idl_type = deleter.idl_type
1398 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') 1402 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState')
1399 return { 1403 return {
1400 'is_call_with_script_state': is_call_with_script_state, 1404 'is_call_with_script_state': is_call_with_script_state,
1401 'is_custom': 'Custom' in extended_attributes, 1405 'is_custom': 'Custom' in extended_attributes,
1402 'is_raises_exception': 'RaisesException' in extended_attributes, 1406 'is_raises_exception': 'RaisesException' in extended_attributes,
1403 'name': cpp_name(deleter), 1407 'name': cpp_name(deleter),
1404 } 1408 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698