| Index: Source/bindings/scripts/v8_interface.py
|
| diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py
|
| index fdefb37d21ec2589a1314edd5f6a4452be179fd1..4b0c3de603fc309970e98ce224bf41aeb563f252 100644
|
| --- a/Source/bindings/scripts/v8_interface.py
|
| +++ b/Source/bindings/scripts/v8_interface.py
|
| @@ -251,11 +251,17 @@ def generate_interface(interface):
|
| if method.name] # Skip anonymous special operations (methods)
|
| generate_method_overloads(methods)
|
| for method in methods:
|
| - method['do_generate_method_configuration'] = (
|
| - method['do_not_check_signature'] and
|
| - not method['per_context_enabled_function'] and
|
| - # For overloaded methods, only generate one accessor
|
| - ('overload_index' not in method or method['overload_index'] == 1))
|
| + if 'overloads' in method:
|
| + overloads = method['overloads']
|
| + method['do_generate_method_configuration'] = (
|
| + overloads['do_not_check_signature_all'] and
|
| + not overloads['per_context_enabled_function_all'])
|
| + else:
|
| + method['do_generate_method_configuration'] = (
|
| + method['do_not_check_signature'] and
|
| + not method['per_context_enabled_function'] and
|
| + # Ignore any overload not handled by the case above
|
| + 'overload_index' not in method)
|
|
|
| template_contents.update({
|
| 'has_origin_safe_method_setter': any(
|
| @@ -359,12 +365,15 @@ def generate_overloads(overloads):
|
|
|
| return {
|
| 'deprecate_all_as': common_value(overloads, 'deprecate_as'), # [DeprecateAs]
|
| + 'do_not_check_signature_all': common_value(overloads, 'do_not_check_signature'),
|
| 'length_tests_methods': length_tests_methods(effective_overloads_by_length),
|
| 'minarg': lengths[0],
|
| # 1. Let maxarg be the length of the longest type list of the
|
| # entries in S.
|
| 'maxarg': lengths[-1],
|
| 'measure_all_as': common_value(overloads, 'measure_as'), # [MeasureAs]
|
| + 'per_context_enabled_function_all': common_value(overloads, 'per_context_enabled_function'), # [PerContextEnabled]
|
| + 'runtime_enabled_function_all': common_value(overloads, 'runtime_enabled_function'), # [RuntimeEnabled]
|
| 'valid_arities': lengths
|
| # Only need to report valid arities if there is a gap in the
|
| # sequence of possible lengths, otherwise invalid length means
|
| @@ -687,7 +696,9 @@ def resolution_tests_methods(effective_overloads):
|
| pass
|
|
|
| # (Perform automatic type conversion, in order. If any of these match,
|
| - # that’s the end, and no other tests are needed.)
|
| + # that’s the end, and no other tests are needed.) To keep this code simple,
|
| + # we rely on the C++ compiler's dead code elimination to deal with the
|
| + # redundancy if both cases below trigger.
|
|
|
| # 11. Otherwise: if there is an entry in S that has one of the following
|
| # types at position i of its type list,
|
| @@ -697,7 +708,6 @@ def resolution_tests_methods(effective_overloads):
|
| method = next(method for idl_type, method in idl_types_methods
|
| if idl_type.name == 'String' or idl_type.is_enum)
|
| yield 'true', method
|
| - return
|
| except StopIteration:
|
| pass
|
|
|
| @@ -708,7 +718,6 @@ def resolution_tests_methods(effective_overloads):
|
| method = next(method for idl_type, method in idl_types_methods
|
| if idl_type.is_numeric_type)
|
| yield 'true', method
|
| - return
|
| except StopIteration:
|
| pass
|
|
|
|
|