OLD | NEW |
---|---|
1 # Copyright (C) 2013 Google Inc. All rights reserved. | 1 # Copyright (C) 2013 Google Inc. All rights reserved. |
2 # coding=utf-8 | 2 # coding=utf-8 |
3 # | 3 # |
4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
6 # met: | 6 # met: |
7 # | 7 # |
8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
191 includes.add('bindings/core/v8/BindingSecurity.h') | 191 includes.add('bindings/core/v8/BindingSecurity.h') |
192 includes.add('core/frame/LocalDOMWindow.h') | 192 includes.add('core/frame/LocalDOMWindow.h') |
193 | 193 |
194 # [DependentLifetime] | 194 # [DependentLifetime] |
195 is_dependent_lifetime = 'DependentLifetime' in extended_attributes | 195 is_dependent_lifetime = 'DependentLifetime' in extended_attributes |
196 | 196 |
197 # [PrimaryGlobal] and [Global] | 197 # [PrimaryGlobal] and [Global] |
198 is_global = ('PrimaryGlobal' in extended_attributes or | 198 is_global = ('PrimaryGlobal' in extended_attributes or |
199 'Global' in extended_attributes) | 199 'Global' in extended_attributes) |
200 | 200 |
201 # [ImmutablePrototype] | |
202 # TODO(littledan): Is it possible to deduce this based on inheritance, | |
203 # as in the WebIDL spec? | |
204 is_immutable_prototype = is_global or 'ImmutablePrototype' in extended_attri butes | |
haraken
2016/10/27 08:47:05
Why is is_global not enough? You want to set the i
Dan Ehrenberg
2016/10/27 09:03:45
Also EventTarget
| |
205 | |
201 # [SetWrapperReferenceFrom] | 206 # [SetWrapperReferenceFrom] |
202 set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFro m') | 207 set_wrapper_reference_from = extended_attributes.get('SetWrapperReferenceFro m') |
203 if set_wrapper_reference_from: | 208 if set_wrapper_reference_from: |
204 includes.update(['bindings/core/v8/V8GCController.h', | 209 includes.update(['bindings/core/v8/V8GCController.h', |
205 'core/dom/Element.h']) | 210 'core/dom/Element.h']) |
206 | 211 |
207 # [SetWrapperReferenceTo] | 212 # [SetWrapperReferenceTo] |
208 set_wrapper_reference_to_argument = extended_attributes.get('SetWrapperRefer enceTo') | 213 set_wrapper_reference_to_argument = extended_attributes.get('SetWrapperRefer enceTo') |
209 set_wrapper_reference_to = None | 214 set_wrapper_reference_to = None |
210 if set_wrapper_reference_to_argument: | 215 if set_wrapper_reference_to_argument: |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
251 'has_partial_interface': len(interface.partial_interfaces) > 0, | 256 'has_partial_interface': len(interface.partial_interfaces) > 0, |
252 'has_visit_dom_wrapper': has_visit_dom_wrapper, | 257 'has_visit_dom_wrapper': has_visit_dom_wrapper, |
253 'has_visit_dom_wrapper_custom': has_visit_dom_wrapper_custom, | 258 'has_visit_dom_wrapper_custom': has_visit_dom_wrapper_custom, |
254 'header_includes': header_includes, | 259 'header_includes': header_includes, |
255 'interface_name': interface.name, | 260 'interface_name': interface.name, |
256 'is_array_buffer_or_view': is_array_buffer_or_view, | 261 'is_array_buffer_or_view': is_array_buffer_or_view, |
257 'is_check_security': is_check_security, | 262 'is_check_security': is_check_security, |
258 'is_event_target': is_event_target, | 263 'is_event_target': is_event_target, |
259 'is_exception': interface.is_exception, | 264 'is_exception': interface.is_exception, |
260 'is_global': is_global, | 265 'is_global': is_global, |
266 'is_immutable_prototype': is_immutable_prototype, | |
261 'is_node': inherits_interface(interface.name, 'Node'), | 267 'is_node': inherits_interface(interface.name, 'Node'), |
262 'is_partial': interface.is_partial, | 268 'is_partial': interface.is_partial, |
263 'is_typed_array_type': is_typed_array_type, | 269 'is_typed_array_type': is_typed_array_type, |
264 'lifetime': 'Dependent' if (has_visit_dom_wrapper or is_dependent_lifeti me) else 'Independent', | 270 'lifetime': 'Dependent' if (has_visit_dom_wrapper or is_dependent_lifeti me) else 'Independent', |
265 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] | 271 'measure_as': v8_utilities.measure_as(interface, None), # [MeasureAs] |
266 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(interface), | 272 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_funct ion_name(interface), |
267 'parent_interface': parent_interface, | 273 'parent_interface': parent_interface, |
268 'pass_cpp_type': cpp_name(interface) + '*', | 274 'pass_cpp_type': cpp_name(interface) + '*', |
269 'active_scriptwrappable': active_scriptwrappable, | 275 'active_scriptwrappable': active_scriptwrappable, |
270 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled] | 276 'runtime_enabled_function': runtime_enabled_function_name(interface), # [RuntimeEnabled] |
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1449 extended_attributes = deleter.extended_attributes | 1455 extended_attributes = deleter.extended_attributes |
1450 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') | 1456 is_call_with_script_state = v8_utilities.has_extended_attribute_value(delete r, 'CallWith', 'ScriptState') |
1451 is_ce_reactions = 'CEReactions' in extended_attributes | 1457 is_ce_reactions = 'CEReactions' in extended_attributes |
1452 return { | 1458 return { |
1453 'is_call_with_script_state': is_call_with_script_state, | 1459 'is_call_with_script_state': is_call_with_script_state, |
1454 'is_ce_reactions': is_ce_reactions, | 1460 'is_ce_reactions': is_ce_reactions, |
1455 'is_custom': 'Custom' in extended_attributes, | 1461 'is_custom': 'Custom' in extended_attributes, |
1456 'is_raises_exception': 'RaisesException' in extended_attributes, | 1462 'is_raises_exception': 'RaisesException' in extended_attributes, |
1457 'name': cpp_name(deleter), | 1463 'name': cpp_name(deleter), |
1458 } | 1464 } |
OLD | NEW |