Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: third_party/WebKit/Source/bindings/scripts/v8_attributes.py

Issue 2794453002: [Bindings] Replace V8HiddenValue in generated code with V8PrivateProperty (Closed)
Patch Set: . Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 includes.add('bindings/core/v8/V8PrivateProperty.h') 104 includes.add('bindings/core/v8/V8PrivateProperty.h')
105 105
106 if (base_idl_type == 'EventHandler' and 106 if (base_idl_type == 'EventHandler' and
107 interface.name in ['Window', 'WorkerGlobalScope'] and 107 interface.name in ['Window', 'WorkerGlobalScope'] and
108 attribute.name == 'onerror'): 108 attribute.name == 'onerror'):
109 includes.add('bindings/core/v8/V8ErrorHandler.h') 109 includes.add('bindings/core/v8/V8ErrorHandler.h')
110 110
111 cached_attribute_validation_method = extended_attributes.get('CachedAttribut e') 111 cached_attribute_validation_method = extended_attributes.get('CachedAttribut e')
112 keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute) 112 keep_alive_for_gc = is_keep_alive_for_gc(interface, attribute)
113 if cached_attribute_validation_method or keep_alive_for_gc: 113 if cached_attribute_validation_method or keep_alive_for_gc:
114 includes.add('bindings/core/v8/V8HiddenValue.h') 114 includes.add('bindings/core/v8/V8PrivateProperty.h')
115 115
116 # [CachedAccessor] 116 # [CachedAccessor]
117 is_cached_accessor = 'CachedAccessor' in extended_attributes 117 is_cached_accessor = 'CachedAccessor' in extended_attributes
118 if is_cached_accessor: 118 if is_cached_accessor:
119 includes.add('bindings/core/v8/V8PrivateProperty.h') 119 includes.add('bindings/core/v8/V8PrivateProperty.h')
120 120
121 context = { 121 context = {
122 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] 122 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging]
123 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] 123 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging]
124 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging] 124 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging]
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
560 def is_constructor_attribute(attribute): 560 def is_constructor_attribute(attribute):
561 return attribute.idl_type.name.endswith('Constructor') 561 return attribute.idl_type.name.endswith('Constructor')
562 562
563 563
564 def is_named_constructor_attribute(attribute): 564 def is_named_constructor_attribute(attribute):
565 return attribute.idl_type.name.endswith('ConstructorConstructor') 565 return attribute.idl_type.name.endswith('ConstructorConstructor')
566 566
567 567
568 def update_constructor_attribute_context(interface, attribute, context): 568 def update_constructor_attribute_context(interface, attribute, context):
569 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 569 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698