Chromium Code Reviews| Index: Source/bindings/scripts/v8_interface.py |
| diff --git a/Source/bindings/scripts/v8_interface.py b/Source/bindings/scripts/v8_interface.py |
| index 21c2747c151ce50920308bb99cf2cf54539d53ab..851d32441795a91f8376b0c967e61ef94c173acb 100644 |
| --- a/Source/bindings/scripts/v8_interface.py |
| +++ b/Source/bindings/scripts/v8_interface.py |
| @@ -241,7 +241,7 @@ def interface_context(interface): |
| and attribute['should_be_exposed_to_script'] |
| for attribute in attributes), |
| 'has_constructor_attributes': any(attribute['constructor_type'] for attribute in attributes), |
| - 'has_per_context_enabled_attributes': any(attribute['per_context_enabled_function'] for attribute in attributes), |
| + 'has_conditional_attributes': any(attribute['per_context_enabled_function'] or attribute['custom_exposed_rules'] for attribute in attributes), |
|
Jens Widell
2014/07/29 18:24:29
Should be moved up one line (alphabetical order).
Peter Beverloo
2014/07/30 14:48:15
Done.
|
| 'has_replaceable_attributes': any(attribute['is_replaceable'] for attribute in attributes), |
| }) |
| @@ -265,6 +265,7 @@ def interface_context(interface): |
| methods.append(v8_methods.method_context(interface, method)) |
| per_context_enabled_methods = [] |
| + conditionally_exposed_methods = [] |
| custom_registration_methods = [] |
| method_configuration_methods = [] |
| @@ -276,16 +277,21 @@ def interface_context(interface): |
| if 'overloads' in method: |
| overloads = method['overloads'] |
| per_context_enabled_function = overloads['per_context_enabled_function_all'] |
| + conditionally_exposed_function = overloads['custom_exposed_rules_all'] |
| runtime_enabled_function = overloads['runtime_enabled_function_all'] |
| has_custom_registration = overloads['has_custom_registration_all'] |
| else: |
| per_context_enabled_function = method['per_context_enabled_function'] |
| + conditionally_exposed_function = method['custom_exposed_rules'] |
| runtime_enabled_function = method['runtime_enabled_function'] |
| has_custom_registration = method['has_custom_registration'] |
| if per_context_enabled_function: |
| per_context_enabled_methods.append(method) |
| continue |
| + if conditionally_exposed_function: |
| + conditionally_exposed_methods.append(method) |
| + continue |
| if runtime_enabled_function or has_custom_registration: |
| custom_registration_methods.append(method) |
| continue |
| @@ -313,7 +319,9 @@ def interface_context(interface): |
| method['is_check_security_for_frame'] and not method['is_read_only'] |
| for method in methods), |
| 'method_configuration_methods': method_configuration_methods, |
| + 'has_conditional_methods': per_context_enabled_methods or conditionally_exposed_methods, |
|
Jens Widell
2014/07/29 18:24:29
These dictionary literals should be sorted alphabe
Peter Beverloo
2014/07/30 14:48:15
Done.
|
| 'per_context_enabled_methods': per_context_enabled_methods, |
| + 'conditionally_exposed_methods': conditionally_exposed_methods, |
| 'methods': methods, |
| }) |
| @@ -445,6 +453,7 @@ def overloads_context(overloads): |
| 'measure_all_as': common_value(overloads, 'measure_as'), # [MeasureAs] |
| 'has_custom_registration_all': common_value(overloads, 'has_custom_registration'), |
| 'per_context_enabled_function_all': common_value(overloads, 'per_context_enabled_function'), # [PerContextEnabled] |
| + 'custom_exposed_rules_all': common_value(overloads, 'custom_exposed_rules'), # [Exposed] |
|
Jens Widell
2014/07/29 18:24:29
Alphabetical order.
Peter Beverloo
2014/07/30 14:48:15
Done.
|
| '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 |