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

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

Issue 2008823002: bindings: Supports [SaveSameObject] extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed the documentation. Created 4 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
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 'is_lenient_this': 'LenientThis' in extended_attributes, 128 'is_lenient_this': 'LenientThis' in extended_attributes,
129 'is_nullable': idl_type.is_nullable, 129 'is_nullable': idl_type.is_nullable,
130 'is_explicit_nullable': idl_type.is_explicit_nullable, 130 'is_explicit_nullable': idl_type.is_explicit_nullable,
131 'is_partial_interface_member': 131 'is_partial_interface_member':
132 'PartialInterfaceImplementedAs' in extended_attributes, 132 'PartialInterfaceImplementedAs' in extended_attributes,
133 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes, 133 'is_per_world_bindings': 'PerWorldBindings' in extended_attributes,
134 'is_put_forwards': 'PutForwards' in extended_attributes, 134 'is_put_forwards': 'PutForwards' in extended_attributes,
135 'is_read_only': attribute.is_read_only, 135 'is_read_only': attribute.is_read_only,
136 'is_reflect': is_reflect, 136 'is_reflect': is_reflect,
137 'is_replaceable': 'Replaceable' in attribute.extended_attributes, 137 'is_replaceable': 'Replaceable' in attribute.extended_attributes,
138 'is_save_same_object': (
139 'SameObject' in attribute.extended_attributes and
140 'SaveSameObject' in attribute.extended_attributes),
138 'is_static': attribute.is_static, 141 'is_static': attribute.is_static,
139 'is_url': 'URL' in extended_attributes, 142 'is_url': 'URL' in extended_attributes,
140 'is_unforgeable': is_unforgeable(interface, attribute), 143 'is_unforgeable': is_unforgeable(interface, attribute),
141 'on_instance': v8_utilities.on_instance(interface, attribute), 144 'on_instance': v8_utilities.on_instance(interface, attribute),
142 'on_interface': v8_utilities.on_interface(interface, attribute), 145 'on_interface': v8_utilities.on_interface(interface, attribute),
143 'on_prototype': v8_utilities.on_prototype(interface, attribute), 146 'on_prototype': v8_utilities.on_prototype(interface, attribute),
144 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(attribute), # [OriginTrialEnabled] 147 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(attribute), # [OriginTrialEnabled]
145 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult, 148 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult,
146 'measure_as': v8_utilities.measure_as(attribute, interface), # [Measure As] 149 'measure_as': v8_utilities.measure_as(attribute, interface), # [Measure As]
147 'name': attribute.name, 150 'name': attribute.name,
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 lambda self: strip_suffix(self.base_type, 'Constructor')) 546 lambda self: strip_suffix(self.base_type, 'Constructor'))
544 547
545 548
546 def is_constructor_attribute(attribute): 549 def is_constructor_attribute(attribute):
547 # FIXME: replace this with [ConstructorAttribute] extended attribute 550 # FIXME: replace this with [ConstructorAttribute] extended attribute
548 return attribute.idl_type.name.endswith('Constructor') 551 return attribute.idl_type.name.endswith('Constructor')
549 552
550 553
551 def update_constructor_attribute_context(interface, attribute, context): 554 def update_constructor_attribute_context(interface, attribute, context):
552 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] or context['origin_trial_enabled_function'] # TODO(chasej): Should/can this be true when OriginTrialEnabled is inherited from containing in terface? 555 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] or context['origin_trial_enabled_function'] # TODO(chasej): Should/can this be true when OriginTrialEnabled is inherited from containing in terface?
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698