OLD | NEW |
---|---|
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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 cached_attribute_validation_method = extended_attributes.get('CachedAttribut e') | 92 cached_attribute_validation_method = extended_attributes.get('CachedAttribut e') |
93 keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute) | 93 keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute) |
94 if cached_attribute_validation_method or keep_alive_for_gc: | 94 if cached_attribute_validation_method or keep_alive_for_gc: |
95 includes.add('bindings/core/v8/V8HiddenValue.h') | 95 includes.add('bindings/core/v8/V8HiddenValue.h') |
96 | 96 |
97 context = { | 97 context = { |
98 'access_control_list': access_control_list(interface, attribute), | 98 'access_control_list': access_control_list(interface, attribute), |
99 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] | 99 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] |
100 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] | 100 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] |
101 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging] | 101 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging] |
102 'api_experiment_name': v8_utilities.api_experiment_name(attribute), # [ APIExperimentEnabled] | |
102 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), | 103 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), |
103 'cached_attribute_validation_method': cached_attribute_validation_method , | 104 'cached_attribute_validation_method': cached_attribute_validation_method , |
104 'conditional_string': v8_utilities.conditional_string(attribute), | 105 'conditional_string': v8_utilities.conditional_string(attribute), |
105 'constructor_type': constructor_type, | 106 'constructor_type': constructor_type, |
106 'cpp_name': cpp_name(attribute), | 107 'cpp_name': cpp_name(attribute), |
107 'cpp_type': idl_type.cpp_type, | 108 'cpp_type': idl_type.cpp_type, |
108 'cpp_type_initializer': idl_type.cpp_type_initializer, | 109 'cpp_type_initializer': idl_type.cpp_type_initializer, |
109 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] | 110 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] |
110 'enum_type': idl_type.enum_type, | 111 'enum_type': idl_type.enum_type, |
111 'enum_values': idl_type.enum_values, | 112 'enum_values': idl_type.enum_values, |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
498 # FIXME: replace this with a [ConstructorAttribute] extended attribute | 499 # FIXME: replace this with a [ConstructorAttribute] extended attribute |
499 lambda self: strip_suffix(self.base_type, 'Constructor')) | 500 lambda self: strip_suffix(self.base_type, 'Constructor')) |
500 | 501 |
501 | 502 |
502 def is_constructor_attribute(attribute): | 503 def is_constructor_attribute(attribute): |
503 # FIXME: replace this with [ConstructorAttribute] extended attribute | 504 # FIXME: replace this with [ConstructorAttribute] extended attribute |
504 return attribute.idl_type.name.endswith('Constructor') | 505 return attribute.idl_type.name.endswith('Constructor') |
505 | 506 |
506 | 507 |
507 def update_constructor_attribute_context(interface, attribute, context): | 508 def update_constructor_attribute_context(interface, attribute, context): |
508 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] | 509 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] or context['api_experiment_name'] |
haraken
2015/12/18 02:35:51
Can we remove this now because we've decided to un
Daniel Nishi
2015/12/18 05:11:42
Yes and done.
| |
509 # When the attribute name is the same as the interface name, do not generate | 510 # When the attribute name is the same as the interface name, do not generate |
510 # callback functions for each attribute and use | 511 # callback functions for each attribute and use |
511 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate | 512 # {{cpp_class}}ConstructorAttributeSetterCallback. Otherwise, generate |
512 # a callback function in order to hard-code the attribute name. | 513 # a callback function in order to hard-code the attribute name. |
513 context['needs_constructor_setter_callback'] = context['name'] != context['c onstructor_type'] | 514 context['needs_constructor_setter_callback'] = context['name'] != context['c onstructor_type'] |
OLD | NEW |