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

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

Issue 1107523002: IDL: Drop [PerContextEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 'is_read_only': attribute.is_read_only, 136 'is_read_only': attribute.is_read_only,
137 'is_reflect': is_reflect, 137 'is_reflect': is_reflect,
138 'is_replaceable': 'Replaceable' in attribute.extended_attributes, 138 'is_replaceable': 'Replaceable' in attribute.extended_attributes,
139 'is_static': attribute.is_static, 139 'is_static': attribute.is_static,
140 'is_url': 'URL' in extended_attributes, 140 'is_url': 'URL' in extended_attributes,
141 'is_unforgeable': is_unforgeable(interface, attribute), 141 'is_unforgeable': is_unforgeable(interface, attribute),
142 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult, 142 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult,
143 'measure_as': v8_utilities.measure_as(attribute, interface), # [Measure As] 143 'measure_as': v8_utilities.measure_as(attribute, interface), # [Measure As]
144 'name': attribute.name, 144 'name': attribute.name,
145 'only_exposed_to_private_script': is_only_exposed_to_private_script, 145 'only_exposed_to_private_script': is_only_exposed_to_private_script,
146 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled]
147 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value( 146 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value(
148 extended_attributes, 'v8Value', 'cppValue', bailout_return_value='fa lse', isolate='scriptState->isolate()'), 147 extended_attributes, 'v8Value', 'cppValue', bailout_return_value='fa lse', isolate='scriptState->isolate()'),
149 'property_attributes': property_attributes(interface, attribute), 148 'property_attributes': property_attributes(interface, attribute),
150 'reflect_empty': extended_attributes.get('ReflectEmpty'), 149 'reflect_empty': extended_attributes.get('ReflectEmpty'),
151 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), 150 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''),
152 'reflect_missing': extended_attributes.get('ReflectMissing'), 151 'reflect_missing': extended_attributes.get('ReflectMissing'),
153 'reflect_only': extended_attribute_value_as_list(attribute, 'ReflectOnly '), 152 'reflect_only': extended_attribute_value_as_list(attribute, 'ReflectOnly '),
154 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a ttribute), # [RuntimeEnabled] 153 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a ttribute), # [RuntimeEnabled]
155 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script), 154 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
156 'world_suffixes': ['', 'ForMainWorld'] 155 'world_suffixes': ['', 'ForMainWorld']
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 return attribute.idl_type.name.endswith('Constructor') 553 return attribute.idl_type.name.endswith('Constructor')
555 554
556 555
557 def update_constructor_attribute_context(interface, attribute, context): 556 def update_constructor_attribute_context(interface, attribute, context):
558 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 557 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
559 # When the attribute name is the same as the interface name, do not generate 558 # When the attribute name is the same as the interface name, do not generate
560 # callback functions for each attribute and use 559 # callback functions for each attribute and use
561 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate 560 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate
562 # a callback function in order to hard-code the attribute name. 561 # a callback function in order to hard-code the attribute name.
563 context['needs_constructor_setter_callback'] = context['name'] != context['c onstructor_type'] 562 context['needs_constructor_setter_callback'] = context['name'] != context['c onstructor_type']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698