| Index: third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| index 68e699f52318e485baa54fd770a3915cae033205..2df8528f44dc1761b1583288e25f7599b33fbdc9 100644
|
| --- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| +++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
|
| @@ -46,7 +46,7 @@ import v8_methods
|
| import v8_types
|
| import v8_utilities
|
| from v8_utilities import (cpp_name_or_partial, cpp_name, has_extended_attribute_value,
|
| - runtime_enabled_function_name, is_legacy_interface_type_checking)
|
| + runtime_feature_name, is_legacy_interface_type_checking)
|
|
|
|
|
| INTERFACE_H_INCLUDES = frozenset([
|
| @@ -72,7 +72,7 @@ def filter_has_constant_configuration(constants):
|
| return [constant for constant in constants if
|
| not constant['measure_as'] and
|
| not constant['deprecate_as'] and
|
| - not constant['runtime_enabled_function'] and
|
| + not constant['runtime_enabled'] and
|
| not constant['origin_trial_feature_name']]
|
|
|
|
|
| @@ -84,7 +84,7 @@ def filter_has_special_getter(constants):
|
|
|
| def filter_runtime_enabled(constants):
|
| return [constant for constant in constants if
|
| - constant['runtime_enabled_function']]
|
| + constant['runtime_enabled']]
|
|
|
|
|
| def filter_origin_trial_enabled(constants):
|
| @@ -273,7 +273,7 @@ def interface_context(interface, interfaces):
|
| 'parent_interface': parent_interface,
|
| 'pass_cpp_type': cpp_name(interface) + '*',
|
| 'active_scriptwrappable': active_scriptwrappable,
|
| - 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled]
|
| + 'runtime_enabled': runtime_feature_name(interface), # [RuntimeEnabled]
|
| 'set_wrapper_reference_from': set_wrapper_reference_from,
|
| 'set_wrapper_reference_to': set_wrapper_reference_to,
|
| 'v8_class': v8_class_name,
|
| @@ -327,10 +327,10 @@ def interface_context(interface, interfaces):
|
| unscopables = []
|
| for attribute in interface.attributes:
|
| if 'Unscopable' in attribute.extended_attributes:
|
| - unscopables.append((attribute.name, v8_utilities.runtime_enabled_function_name(attribute)))
|
| + unscopables.append((attribute.name, runtime_feature_name(attribute)))
|
| for method in interface.operations:
|
| if 'Unscopable' in method.extended_attributes:
|
| - unscopables.append((method.name, v8_utilities.runtime_enabled_function_name(method)))
|
| + unscopables.append((method.name, runtime_feature_name(method)))
|
|
|
| # [CEReactions]
|
| setter_or_deleters = (
|
| @@ -711,8 +711,7 @@ def constant_context(constant, interface):
|
| 'origin_trial_feature_name': v8_utilities.origin_trial_feature_name(constant), # [OriginTrialEnabled]
|
| # FIXME: use 'reflected_name' as correct 'name'
|
| 'reflected_name': extended_attributes.get('Reflect', reflected_name(constant.name)),
|
| - 'runtime_enabled_function': runtime_enabled_function_name(constant), # [RuntimeEnabled]
|
| - 'runtime_feature_name': v8_utilities.runtime_feature_name(constant), # [RuntimeEnabled]
|
| + 'runtime_enabled': runtime_feature_name(constant), # [RuntimeEnabled]
|
| 'value': constant.value,
|
| }
|
|
|
| @@ -790,26 +789,26 @@ def overloads_context(interface, overloads):
|
|
|
| # The special case handling below is not needed if all overloads are
|
| # runtime enabled by the same feature.
|
| - if not common_value(overloads, 'runtime_enabled_function'):
|
| + if not common_value(overloads, 'runtime_enabled'):
|
| # Check if all overloads with the shortest acceptable arguments list are
|
| # runtime enabled, in which case we need to have a runtime determined
|
| # Function.length.
|
| shortest_overloads = effective_overloads_by_length[0][1]
|
| - if (all(method.get('runtime_enabled_function')
|
| + if (all(method.get('runtime_enabled')
|
| for method, _, _ in shortest_overloads)):
|
| - # Generate a list of (length, runtime_enabled_functions) tuples.
|
| + # Generate a list of (length, runtime_enabled) tuples.
|
| runtime_determined_lengths = []
|
| for length, effective_overloads in effective_overloads_by_length:
|
| - runtime_enabled_functions = set(
|
| - method['runtime_enabled_function']
|
| + runtime_enableds = set(
|
| + method['runtime_enabled']
|
| for method, _, _ in effective_overloads
|
| - if method.get('runtime_enabled_function'))
|
| - if not runtime_enabled_functions:
|
| + if method.get('runtime_enabled'))
|
| + if not runtime_enableds:
|
| # This "length" is unconditionally enabled, so stop here.
|
| runtime_determined_lengths.append((length, [None]))
|
| break
|
| runtime_determined_lengths.append(
|
| - (length, sorted(runtime_enabled_functions)))
|
| + (length, sorted(runtime_enableds)))
|
| function_length = ('%sV8Internal::%sMethodLength()'
|
| % (cpp_name_or_partial(interface), name))
|
|
|
| @@ -817,22 +816,22 @@ def overloads_context(interface, overloads):
|
| # runtime enabled, in which case we need to have a runtime determined
|
| # maximum distinguishing argument index.
|
| longest_overloads = effective_overloads_by_length[-1][1]
|
| - if (not common_value(overloads, 'runtime_enabled_function') and
|
| - all(method.get('runtime_enabled_function')
|
| + if (not common_value(overloads, 'runtime_enabled') and
|
| + all(method.get('runtime_enabled')
|
| for method, _, _ in longest_overloads)):
|
| - # Generate a list of (length, runtime_enabled_functions) tuples.
|
| + # Generate a list of (length, runtime_enabled) tuples.
|
| runtime_determined_maxargs = []
|
| for length, effective_overloads in reversed(effective_overloads_by_length):
|
| - runtime_enabled_functions = set(
|
| - method['runtime_enabled_function']
|
| + runtime_enableds = set(
|
| + method['runtime_enabled']
|
| for method, _, _ in effective_overloads
|
| - if method.get('runtime_enabled_function'))
|
| - if not runtime_enabled_functions:
|
| + if method.get('runtime_enabled'))
|
| + if not runtime_enableds:
|
| # This "length" is unconditionally enabled, so stop here.
|
| runtime_determined_maxargs.append((length, [None]))
|
| break
|
| runtime_determined_maxargs.append(
|
| - (length, sorted(runtime_enabled_functions)))
|
| + (length, sorted(runtime_enableds)))
|
| maxarg = ('%sV8Internal::%sMethodMaxArg()'
|
| % (cpp_name_or_partial(interface), name))
|
|
|
| @@ -869,7 +868,7 @@ def overloads_context(interface, overloads):
|
| 'returns_promise_all': promise_overload_count > 0,
|
| 'runtime_determined_lengths': runtime_determined_lengths,
|
| 'runtime_determined_maxargs': runtime_determined_maxargs,
|
| - 'runtime_enabled_function_all': common_value(overloads, 'runtime_enabled_function'), # [RuntimeEnabled]
|
| + 'runtime_enabled_all': common_value(overloads, 'runtime_enabled'), # [RuntimeEnabled]
|
| 'secure_context_test_all': common_value(overloads, 'secure_context_test'), # [SecureContext]
|
| 'valid_arities': (lengths
|
| # Only need to report valid arities if there is a gap in the
|
|
|