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

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

Issue 329053002: Throw TypeError when addEventListener or removeEventListener are called without enough arguments (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased 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
« no previous file with comments | « LayoutTests/fast/js/function-length-expected.txt ('k') | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
98 # [DependentLifetime] 99 # [DependentLifetime]
99 is_dependent_lifetime = 'DependentLifetime' in extended_attributes 100 is_dependent_lifetime = 'DependentLifetime' in extended_attributes
100 101
101 # [MeasureAs] 102 # [MeasureAs]
102 is_measure_as = 'MeasureAs' in extended_attributes 103 is_measure_as = 'MeasureAs' in extended_attributes
103 if is_measure_as: 104 if is_measure_as:
104 includes.add('core/frame/UseCounter.h') 105 includes.add('core/frame/UseCounter.h')
105 106
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 'cpp_class': cpp_name(interface), 145 'cpp_class': cpp_name(interface),
145 'gc_type': this_gc_type, 146 'gc_type': this_gc_type,
146 'has_custom_legacy_call_as_function': has_extended_attribute_value(inter face, 'Custom', 'LegacyCallAsFunction'), # [Custom=LegacyCallAsFunction] 147 '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] 148 '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] 149 'has_custom_wrap': has_extended_attribute_value(interface, 'Custom', 'Wr ap'), # [Custom=Wrap]
149 'has_visit_dom_wrapper': has_visit_dom_wrapper, 150 'has_visit_dom_wrapper': has_visit_dom_wrapper,
150 'header_includes': header_includes, 151 'header_includes': header_includes,
151 'interface_name': interface.name, 152 'interface_name': interface.name,
152 'is_active_dom_object': is_active_dom_object, 153 'is_active_dom_object': is_active_dom_object,
153 'is_audio_buffer': is_audio_buffer, 154 'is_audio_buffer': is_audio_buffer,
154 'is_check_security': is_check_security, 155 'is_check_security_for_frame': is_check_security_for_frame,
155 'is_dependent_lifetime': is_dependent_lifetime, 156 'is_dependent_lifetime': is_dependent_lifetime,
156 'is_document': is_document, 157 'is_document': is_document,
157 'is_event_target': inherits_interface(interface.name, 'EventTarget'), 158 'is_event_target': inherits_interface(interface.name, 'EventTarget'),
158 'is_exception': interface.is_exception, 159 'is_exception': interface.is_exception,
159 'is_node': inherits_interface(interface.name, 'Node'), 160 'is_node': inherits_interface(interface.name, 'Node'),
160 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs] 161 'measure_as': v8_utilities.measure_as(interface), # [MeasureAs]
161 'parent_interface': parent_interface, 162 'parent_interface': parent_interface,
162 'pass_cpp_type': cpp_template_type( 163 'pass_cpp_type': cpp_template_type(
163 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type), 164 cpp_ptr_type('PassRefPtr', 'RawPtr', this_gc_type),
164 cpp_name(interface)), 165 cpp_name(interface)),
(...skipping 911 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 deleter = next( 1077 deleter = next(
1077 method 1078 method
1078 for method in interface.operations 1079 for method in interface.operations
1079 if ('deleter' in method.specials and 1080 if ('deleter' in method.specials and
1080 len(method.arguments) == 1 and 1081 len(method.arguments) == 1 and
1081 str(method.arguments[0].idl_type) == 'DOMString')) 1082 str(method.arguments[0].idl_type) == 'DOMString'))
1082 except StopIteration: 1083 except StopIteration:
1083 return None 1084 return None
1084 1085
1085 return property_deleter(deleter) 1086 return property_deleter(deleter)
OLDNEW
« no previous file with comments | « LayoutTests/fast/js/function-length-expected.txt ('k') | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698