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

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

Issue 1531443003: [bindings] Implement an ExperimentEnabled IDL extended attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 if idl_type.is_explicit_nullable else idl_type.cpp_type), 132 if idl_type.is_explicit_nullable else idl_type.cpp_type),
133 'cpp_value': this_cpp_value, 133 'cpp_value': this_cpp_value,
134 'cpp_type_initializer': idl_type.cpp_type_initializer, 134 'cpp_type_initializer': idl_type.cpp_type_initializer,
135 'custom_registration_extended_attributes': 135 'custom_registration_extended_attributes':
136 CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES.intersection( 136 CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES.intersection(
137 extended_attributes.iterkeys()), 137 extended_attributes.iterkeys()),
138 'deprecate_as': v8_utilities.deprecate_as(method), # [DeprecateAs] 138 'deprecate_as': v8_utilities.deprecate_as(method), # [DeprecateAs]
139 'exposed_test': v8_utilities.exposed(method, interface), # [Exposed] 139 'exposed_test': v8_utilities.exposed(method, interface), # [Exposed]
140 # TODO(yukishiino): Retire has_custom_registration flag. Should be 140 # TODO(yukishiino): Retire has_custom_registration flag. Should be
141 # replaced with V8DOMConfiguration::PropertyLocationConfiguration. 141 # replaced with V8DOMConfiguration::PropertyLocationConfiguration.
142 'experimental_api_name': v8_utilities.experimental_api_name(method), # [ExperimentEnabled]
haraken 2015/12/16 02:16:41 Move this up to above the TODO comment.
Daniel Nishi 2015/12/16 21:42:02 Done.
142 'has_custom_registration': 143 'has_custom_registration':
143 v8_utilities.has_extended_attribute( 144 v8_utilities.has_extended_attribute(
144 method, CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES), 145 method, CUSTOM_REGISTRATION_EXTENDED_ATTRIBUTES),
145 'has_exception_state': 146 'has_exception_state':
146 is_raises_exception or 147 is_raises_exception or
147 is_check_security_for_receiver or 148 is_check_security_for_receiver or
148 any(argument for argument in arguments 149 any(argument for argument in arguments
149 if (argument.idl_type.name == 'SerializedScriptValue' or 150 if (argument.idl_type.name == 'SerializedScriptValue' or
150 argument_conversion_needs_exception_state(method, argument)) ), 151 argument_conversion_needs_exception_state(method, argument)) ),
151 'has_optional_argument_without_default_value': 152 'has_optional_argument_without_default_value':
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 return method.idl_type and method.idl_type.name == 'Promise' 474 return method.idl_type and method.idl_type.name == 'Promise'
474 475
475 IdlOperation.returns_promise = property(method_returns_promise) 476 IdlOperation.returns_promise = property(method_returns_promise)
476 477
477 478
478 def argument_conversion_needs_exception_state(method, argument): 479 def argument_conversion_needs_exception_state(method, argument):
479 idl_type = argument.idl_type 480 idl_type = argument.idl_type
480 return (idl_type.v8_conversion_needs_exception_state or 481 return (idl_type.v8_conversion_needs_exception_state or
481 argument.is_variadic or 482 argument.is_variadic or
482 (method.returns_promise and idl_type.is_string_type)) 483 (method.returns_promise and idl_type.is_string_type))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698