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_methods.py

Issue 877523004: Add extended attribute, [Measure], to simplify use counting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute s, 154 'is_do_not_check_signature': 'DoNotCheckSignature' in extended_attribute s,
155 'is_explicit_nullable': idl_type.is_explicit_nullable, 155 'is_explicit_nullable': idl_type.is_explicit_nullable,
156 'is_implemented_in_private_script': is_implemented_in_private_script, 156 'is_implemented_in_private_script': is_implemented_in_private_script,
157 'is_partial_interface_member': 157 'is_partial_interface_member':
158 'PartialInterfaceImplementedAs' in extended_attributes, 158 'PartialInterfaceImplementedAs' in extended_attributes,
159 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, 159 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
160 'is_raises_exception': is_raises_exception, 160 'is_raises_exception': is_raises_exception,
161 'is_read_only': 'Unforgeable' in extended_attributes, 161 'is_read_only': 'Unforgeable' in extended_attributes,
162 'is_static': is_static, 162 'is_static': is_static,
163 'is_variadic': arguments and arguments[-1].is_variadic, 163 'is_variadic': arguments and arguments[-1].is_variadic,
164 'measure_as': v8_utilities.measure_as(method), # [MeasureAs] 164 'measure_as': v8_utilities.measure_as(method, interface), # [MeasureAs]
165 'name': name, 165 'name': name,
166 'number_of_arguments': len(arguments), 166 'number_of_arguments': len(arguments),
167 'number_of_required_arguments': len([ 167 'number_of_required_arguments': len([
168 argument for argument in arguments 168 argument for argument in arguments
169 if not (argument.is_optional or argument.is_variadic)]), 169 if not (argument.is_optional or argument.is_variadic)]),
170 'number_of_required_or_variadic_arguments': len([ 170 'number_of_required_or_variadic_arguments': len([
171 argument for argument in arguments 171 argument for argument in arguments
172 if not argument.is_optional]), 172 if not argument.is_optional]),
173 'only_exposed_to_private_script': is_only_exposed_to_private_script, 173 'only_exposed_to_private_script': is_only_exposed_to_private_script,
174 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(method), # [PerContextEnabled] 174 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(method), # [PerContextEnabled]
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 446
447 IdlOperation.returns_promise = property(method_returns_promise) 447 IdlOperation.returns_promise = property(method_returns_promise)
448 448
449 449
450 def argument_conversion_needs_exception_state(method, argument): 450 def argument_conversion_needs_exception_state(method, argument):
451 idl_type = argument.idl_type 451 idl_type = argument.idl_type
452 return (idl_type.v8_conversion_needs_exception_state or 452 return (idl_type.v8_conversion_needs_exception_state or
453 argument.is_variadic or 453 argument.is_variadic or
454 (method.returns_promise and (idl_type.is_string_type or 454 (method.returns_promise and (idl_type.is_string_type or
455 idl_type.is_enum))) 455 idl_type.is_enum)))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698