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

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

Issue 181513002: Kill [SetWrapperReferenceFromReference] IDL extended attribute (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 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 | Annotate | Revision Log
OLDNEW
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 if is_check_security: 88 if is_check_security:
89 includes.add('bindings/v8/BindingSecurity.h') 89 includes.add('bindings/v8/BindingSecurity.h')
90 90
91 # [MeasureAs] 91 # [MeasureAs]
92 is_measure_as = 'MeasureAs' in extended_attributes 92 is_measure_as = 'MeasureAs' in extended_attributes
93 if is_measure_as: 93 if is_measure_as:
94 includes.add('core/frame/UseCounter.h') 94 includes.add('core/frame/UseCounter.h')
95 95
96 # [SetWrapperReferenceFrom] 96 # [SetWrapperReferenceFrom]
97 reachable_node_function = extended_attributes.get('SetWrapperReferenceFrom') 97 reachable_node_function = extended_attributes.get('SetWrapperReferenceFrom')
98 reachable_node_reference_function = extended_attributes.get('SetWrapperRefer enceFromReference') 98 if reachable_node_function:
99 if reachable_node_function or reachable_node_reference_function:
100 includes.update(['bindings/v8/V8GCController.h', 99 includes.update(['bindings/v8/V8GCController.h',
101 'core/dom/Element.h']) 100 'core/dom/Element.h'])
102 101
103 # [SetWrapperReferenceTo] 102 # [SetWrapperReferenceTo]
104 set_wrapper_reference_to_list = [{ 103 set_wrapper_reference_to_list = [{
105 'name': argument.name, 104 'name': argument.name,
106 # FIXME: properly should be: 105 # FIXME: properly should be:
107 # 'cpp_type': v8_types.cpp_type(argument.idl_type, used_as_argument=True ), 106 # 'cpp_type': v8_types.cpp_type(argument.idl_type, used_as_argument=True ),
108 # (if type is non-wrapper type like NodeFilter, normally RefPtr) 107 # (if type is non-wrapper type like NodeFilter, normally RefPtr)
109 # Raw pointers faster though, and NodeFilter hacky anyway. 108 # Raw pointers faster though, and NodeFilter hacky anyway.
(...skipping 18 matching lines...) Expand all
128 template_contents = { 127 template_contents = {
129 'conditional_string': conditional_string(interface), # [Conditional] 128 'conditional_string': conditional_string(interface), # [Conditional]
130 'cpp_class': cpp_name(interface), 129 'cpp_class': cpp_name(interface),
131 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] 130 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction]
132 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'T oV8'), # [Custom=ToV8] 131 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'T oV8'), # [Custom=ToV8]
133 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr ap'), # [Custom=Wrap] 132 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr ap'), # [Custom=Wrap]
134 'has_visit_dom_wrapper': ( 133 'has_visit_dom_wrapper': (
135 # [Custom=Wrap], [SetWrapperReferenceFrom] 134 # [Custom=Wrap], [SetWrapperReferenceFrom]
136 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or 135 has_extended_attribute_value(interface, 'Custom', 'VisitDOMWrapper') or
137 reachable_node_function or 136 reachable_node_function or
138 reachable_node_reference_function or
139 set_wrapper_reference_to_list), 137 set_wrapper_reference_to_list),
140 'header_includes': header_includes, 138 'header_includes': header_includes,
141 'interface_name': interface.name, 139 'interface_name': interface.name,
142 'is_active_dom_object': 'ActiveDOMObject' in extended_attributes, # [Ac tiveDOMObject] 140 'is_active_dom_object': 'ActiveDOMObject' in extended_attributes, # [Ac tiveDOMObject]
143 'is_audio_buffer': is_audio_buffer, 141 'is_audio_buffer': is_audio_buffer,
144 'is_check_security': is_check_security, 142 'is_check_security': is_check_security,
145 'is_dependent_lifetime': 'DependentLifetime' in extended_attributes, # [DependentLifetime] 143 'is_dependent_lifetime': 'DependentLifetime' in extended_attributes, # [DependentLifetime]
146 'is_document': is_document, 144 'is_document': is_document,
147 'is_event_target': inherits_interface(interface.name, 'EventTarget'), 145 'is_event_target': inherits_interface(interface.name, 'EventTarget'),
148 'is_exception': interface.is_exception, 146 'is_exception': interface.is_exception,
149 'is_will_be_garbage_collected': is_will_be_garbage_collected, 147 'is_will_be_garbage_collected': is_will_be_garbage_collected,
150 'is_node': inherits_interface(interface.name, 'Node'), 148 'is_node': inherits_interface(interface.name, 'Node'),
151 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] 149 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs]
152 'parent_interface': parent_interface, 150 'parent_interface': parent_interface,
153 'pass_ref_ptr': 'PassRefPtrWillBeRawPtr' 151 'pass_ref_ptr': 'PassRefPtrWillBeRawPtr'
154 if is_will_be_garbage_collected else 'PassRefPtr', 152 if is_will_be_garbage_collected else 'PassRefPtr',
155 'reachable_node_function': reachable_node_function, 153 'reachable_node_function': reachable_node_function,
156 'reachable_node_reference_function': reachable_node_reference_function,
157 'ref_ptr': 'RefPtrWillBeRawPtr' 154 'ref_ptr': 'RefPtrWillBeRawPtr'
158 if is_will_be_garbage_collected else 'RefPtr', 155 if is_will_be_garbage_collected else 'RefPtr',
159 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled] 156 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled]
160 'set_wrapper_reference_to_list': set_wrapper_reference_to_list, 157 'set_wrapper_reference_to_list': set_wrapper_reference_to_list,
161 'special_wrap_for': special_wrap_for, 158 'special_wrap_for': special_wrap_for,
162 'v8_class': v8_utilities.v8_class_name(interface), 159 'v8_class': v8_utilities.v8_class_name(interface),
163 } 160 }
164 161
165 # Constructors 162 # Constructors
166 constructors = [generate_constructor(interface, constructor) 163 constructors = [generate_constructor(interface, constructor)
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
718 deleter = next( 715 deleter = next(
719 method 716 method
720 for method in interface.operations 717 for method in interface.operations
721 if ('deleter' in method.specials and 718 if ('deleter' in method.specials and
722 len(method.arguments) == 1 and 719 len(method.arguments) == 1 and
723 method.arguments[0].idl_type == 'DOMString')) 720 method.arguments[0].idl_type == 'DOMString'))
724 except StopIteration: 721 except StopIteration:
725 return None 722 return None
726 723
727 return property_deleter(deleter) 724 return property_deleter(deleter)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698