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

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

Issue 329223004: [DeprecateAs] if call addEventListener or removeEventListener without enough arguments Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move ext attr to interface Created 6 years, 6 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 # 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 is_document = inherits_interface(interface.name, 'Document') 84 is_document = inherits_interface(interface.name, 'Document')
85 if is_document: 85 if is_document:
86 includes.update(['bindings/v8/ScriptController.h', 86 includes.update(['bindings/v8/ScriptController.h',
87 'bindings/v8/V8WindowShell.h', 87 'bindings/v8/V8WindowShell.h',
88 'core/frame/LocalFrame.h']) 88 'core/frame/LocalFrame.h'])
89 89
90 # [ActiveDOMObject] 90 # [ActiveDOMObject]
91 is_active_dom_object = 'ActiveDOMObject' in extended_attributes 91 is_active_dom_object = 'ActiveDOMObject' in extended_attributes
92 92
93 # [CheckSecurity] 93 # [CheckSecurity=Frame]
94 is_check_security = 'CheckSecurity' in extended_attributes 94 is_check_security_for_frame = has_extended_attribute_value(
95 if is_check_security: 95 interface, 'CheckSecurity', 'Frame')
96 if is_check_security_for_frame:
96 includes.add('bindings/v8/BindingSecurity.h') 97 includes.add('bindings/v8/BindingSecurity.h')
97 98
99 # [CheckSecurity=Window]
100 is_check_security_for_window = has_extended_attribute_value(
101 interface, 'CheckSecurity', 'Window')
102 if is_check_security_for_window:
103 includes.update(['bindings/v8/BindingSecurity.h',
104 'core/frame/DOMWindow.h'])
105
98 # [DependentLifetime] 106 # [DependentLifetime]
99 is_dependent_lifetime = 'DependentLifetime' in extended_attributes 107 is_dependent_lifetime = 'DependentLifetime' in extended_attributes
100 108
101 # [MeasureAs] 109 # [MeasureAs]
102 is_measure_as = 'MeasureAs' in extended_attributes 110 is_measure_as = 'MeasureAs' in extended_attributes
103 if is_measure_as: 111 if is_measure_as:
104 includes.add('core/frame/UseCounter.h') 112 includes.add('core/frame/UseCounter.h')
105 113
106 # [SetWrapperReferenceFrom] 114 # [SetWrapperReferenceFrom]
107 reachable_node_function = extended_attributes.get('SetWrapperReferenceFrom') 115 reachable_node_function = extended_attributes.get('SetWrapperReferenceFrom')
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 'cpp_class': cpp_name(interface), 152 'cpp_class': cpp_name(interface),
145 'gc_type': this_gc_type, 153 'gc_type': this_gc_type,
146 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] 154 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction]
147 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'T oV8'), # [Custom=ToV8] 155 'has_custom_to_v8': has_extended_attribute_value(interface, 'Custom', 'T oV8'), # [Custom=ToV8]
148 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr ap'), # [Custom=Wrap] 156 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr ap'), # [Custom=Wrap]
149 'has_visit_dom_wrapper': has_visit_dom_wrapper, 157 'has_visit_dom_wrapper': has_visit_dom_wrapper,
150 'header_includes': header_includes, 158 'header_includes': header_includes,
151 'interface_name': interface.name, 159 'interface_name': interface.name,
152 'is_active_dom_object': is_active_dom_object, 160 'is_active_dom_object': is_active_dom_object,
153 'is_audio_buffer': is_audio_buffer, 161 'is_audio_buffer': is_audio_buffer,
154 'is_check_security': is_check_security, 162 'is_check_security_for_frame': is_check_security_for_frame,
163 'is_check_security_for_window': is_check_security_for_window,
155 'is_dependent_lifetime': is_dependent_lifetime, 164 'is_dependent_lifetime': is_dependent_lifetime,
156 'is_document': is_document, 165 'is_document': is_document,
157 'is_event_target': inherits_interface(interface.name, 'EventTarget'), 166 'is_event_target': inherits_interface(interface.name, 'EventTarget'),
158 'is_exception': interface.is_exception, 167 'is_exception': interface.is_exception,
159 'is_node': inherits_interface(interface.name, 'Node'), 168 'is_node': inherits_interface(interface.name, 'Node'),
160 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] 169 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs]
161 'parent_interface': parent_interface, 170 'parent_interface': parent_interface,
162 'pass_cpp_type': cpp_template_type( 171 'pass_cpp_type': cpp_template_type(
163 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type), 172 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type),
164 cpp_name(interface)), 173 cpp_name(interface)),
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 deleter = next( 1042 deleter = next(
1034 method 1043 method
1035 for method in interface.operations 1044 for method in interface.operations
1036 if ('deleter' in method.specials and 1045 if ('deleter' in method.specials and
1037 len(method.arguments) == 1 and 1046 len(method.arguments) == 1 and
1038 str(method.arguments[0].idl_type) == 'DOMString')) 1047 str(method.arguments[0].idl_type) == 'DOMString'))
1039 except StopIteration: 1048 except StopIteration:
1040 return None 1049 return None
1041 1050
1042 return property_deleter(deleter) 1051 return property_deleter(deleter)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698