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

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

Issue 946973005: IDL: Drop value conversion (V8 -> C++) macros from generated code (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: address comments Created 5 years, 10 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
« no previous file with comments | « Source/bindings/core/v8/V8StringResource.h ('k') | Source/bindings/scripts/v8_dictionary.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 # 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 'is_replaceable': 'Replaceable' in attribute.extended_attributes, 119 'is_replaceable': 'Replaceable' in attribute.extended_attributes,
120 'is_static': attribute.is_static, 120 'is_static': attribute.is_static,
121 'is_url': 'URL' in extended_attributes, 121 'is_url': 'URL' in extended_attributes,
122 'is_unforgeable': is_unforgeable(interface, attribute), 122 'is_unforgeable': is_unforgeable(interface, attribute),
123 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult, 123 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult,
124 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] 124 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs]
125 'name': attribute.name, 125 'name': attribute.name,
126 'only_exposed_to_private_script': is_only_exposed_to_private_script, 126 'only_exposed_to_private_script': is_only_exposed_to_private_script,
127 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled] 127 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled]
128 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value( 128 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value(
129 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is olate()', used_in_private_script=True), 129 extended_attributes, 'v8Value', 'cppValue', bailout_return_value='fa lse', isolate='scriptState->isolate()'),
130 'property_attributes': property_attributes(interface, attribute), 130 'property_attributes': property_attributes(interface, attribute),
131 'put_forwards': 'PutForwards' in extended_attributes, 131 'put_forwards': 'PutForwards' in extended_attributes,
132 'reflect_empty': extended_attributes.get('ReflectEmpty'), 132 'reflect_empty': extended_attributes.get('ReflectEmpty'),
133 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), 133 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''),
134 'reflect_missing': extended_attributes.get('ReflectMissing'), 134 'reflect_missing': extended_attributes.get('ReflectMissing'),
135 'reflect_only': extended_attribute_value_as_list(attribute, 'ReflectOnly '), 135 'reflect_only': extended_attribute_value_as_list(attribute, 'ReflectOnly '),
136 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a ttribute), # [RuntimeEnabled] 136 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a ttribute), # [RuntimeEnabled]
137 'setter_callback': setter_callback_name(interface, attribute), 137 'setter_callback': setter_callback_name(interface, attribute),
138 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script), 138 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
139 'world_suffixes': ['', 'ForMainWorld'] 139 'world_suffixes': ['', 'ForMainWorld']
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 lambda self: strip_suffix(self.base_type, 'Constructor')) 497 lambda self: strip_suffix(self.base_type, 'Constructor'))
498 498
499 499
500 def is_constructor_attribute(attribute): 500 def is_constructor_attribute(attribute):
501 # FIXME: replace this with [ConstructorAttribute] extended attribute 501 # FIXME: replace this with [ConstructorAttribute] extended attribute
502 return attribute.idl_type.name.endswith('Constructor') 502 return attribute.idl_type.name.endswith('Constructor')
503 503
504 504
505 def constructor_getter_context(interface, attribute, context): 505 def constructor_getter_context(interface, attribute, context):
506 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 506 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/V8StringResource.h ('k') | Source/bindings/scripts/v8_dictionary.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698