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

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

Issue 1107523002: IDL: Drop [PerContextEnabled] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebased 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
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/scripts/v8_utilities.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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 'measure_as': v8_utilities.measure_as(method, interface), # [MeasureAs] 173 'measure_as': v8_utilities.measure_as(method, interface), # [MeasureAs]
174 'name': name, 174 'name': name,
175 'number_of_arguments': len(arguments), 175 'number_of_arguments': len(arguments),
176 'number_of_required_arguments': len([ 176 'number_of_required_arguments': len([
177 argument for argument in arguments 177 argument for argument in arguments
178 if not (argument.is_optional or argument.is_variadic)]), 178 if not (argument.is_optional or argument.is_variadic)]),
179 'number_of_required_or_variadic_arguments': len([ 179 'number_of_required_or_variadic_arguments': len([
180 argument for argument in arguments 180 argument for argument in arguments
181 if not argument.is_optional]), 181 if not argument.is_optional]),
182 'only_exposed_to_private_script': is_only_exposed_to_private_script, 182 'only_exposed_to_private_script': is_only_exposed_to_private_script,
183 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(method), # [PerContextEnabled]
184 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value( 183 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value(
185 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is olate()', bailout_return_value='false'), 184 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is olate()', bailout_return_value='false'),
186 'property_attributes': property_attributes(interface, method), 185 'property_attributes': property_attributes(interface, method),
187 'returns_promise': method.returns_promise, 186 'returns_promise': method.returns_promise,
188 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(m ethod), # [RuntimeEnabled] 187 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(m ethod), # [RuntimeEnabled]
189 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script), 188 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script),
190 'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSig nature' in extended_attributes else 'defaultSignature', 189 'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSig nature' in extended_attributes else 'defaultSignature',
191 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult, 190 'use_output_parameter_for_result': idl_type.use_output_parameter_for_res ult,
192 'use_local_result': use_local_result(method), 191 'use_local_result': use_local_result(method),
193 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), 192 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value),
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 return method.idl_type and method.idl_type.name == 'Promise' 455 return method.idl_type and method.idl_type.name == 'Promise'
457 456
458 IdlOperation.returns_promise = property(method_returns_promise) 457 IdlOperation.returns_promise = property(method_returns_promise)
459 458
460 459
461 def argument_conversion_needs_exception_state(method, argument): 460 def argument_conversion_needs_exception_state(method, argument):
462 idl_type = argument.idl_type 461 idl_type = argument.idl_type
463 return (idl_type.v8_conversion_needs_exception_state or 462 return (idl_type.v8_conversion_needs_exception_state or
464 argument.is_variadic or 463 argument.is_variadic or
465 (method.returns_promise and idl_type.is_string_type)) 464 (method.returns_promise and idl_type.is_string_type))
OLDNEW
« no previous file with comments | « Source/bindings/scripts/v8_interface.py ('k') | Source/bindings/scripts/v8_utilities.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698