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

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

Issue 877523004: Add extended attribute, [Measure], to simplify use counting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use the same key for overloads. 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 'is_partial_interface_member': 113 'is_partial_interface_member':
114 'PartialInterfaceImplementedAs' in extended_attributes, 114 'PartialInterfaceImplementedAs' in extended_attributes,
115 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, 115 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
116 'is_read_only': attribute.is_read_only, 116 'is_read_only': attribute.is_read_only,
117 'is_reflect': is_reflect, 117 'is_reflect': is_reflect,
118 'is_replaceable': 'Replaceable' in attribute.extended_attributes, 118 'is_replaceable': 'Replaceable' in attribute.extended_attributes,
119 'is_static': attribute.is_static, 119 'is_static': attribute.is_static,
120 'is_url': 'URL' in extended_attributes, 120 'is_url': 'URL' in extended_attributes,
121 'is_unforgeable': 'Unforgeable' in extended_attributes, 121 'is_unforgeable': 'Unforgeable' in extended_attributes,
122 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult, 122 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult,
123 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] 123 'measure_as': v8_utilities.measure_as(attribute, interface), # [Measure As]
124 'name': attribute.name, 124 'name': attribute.name,
125 'only_exposed_to_private_script': is_only_exposed_to_private_script, 125 'only_exposed_to_private_script': is_only_exposed_to_private_script,
126 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled] 126 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled]
127 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value( 127 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value(
128 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is olate()', used_in_private_script=True), 128 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is olate()', used_in_private_script=True),
129 'property_attributes': property_attributes(attribute), 129 'property_attributes': property_attributes(attribute),
130 'put_forwards': 'PutForwards' in extended_attributes, 130 'put_forwards': 'PutForwards' in extended_attributes,
131 'reflect_empty': extended_attributes.get('ReflectEmpty'), 131 'reflect_empty': extended_attributes.get('ReflectEmpty'),
132 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), 132 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''),
133 'reflect_missing': extended_attributes.get('ReflectMissing'), 133 'reflect_missing': extended_attributes.get('ReflectMissing'),
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 lambda self: strip_suffix(self.base_type, 'Constructor')) 496 lambda self: strip_suffix(self.base_type, 'Constructor'))
497 497
498 498
499 def is_constructor_attribute(attribute): 499 def is_constructor_attribute(attribute):
500 # FIXME: replace this with [ConstructorAttribute] extended attribute 500 # FIXME: replace this with [ConstructorAttribute] extended attribute
501 return attribute.idl_type.name.endswith('Constructor') 501 return attribute.idl_type.name.endswith('Constructor')
502 502
503 503
504 def constructor_getter_context(interface, attribute, context): 504 def constructor_getter_context(interface, attribute, context):
505 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 505 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698