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

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

Issue 497773004: IDL: Remove support for [LogPreviousValue] extended attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 if (base_idl_type == 'EventHandler' and 80 if (base_idl_type == 'EventHandler' and
81 interface.name in ['Window', 'WorkerGlobalScope'] and 81 interface.name in ['Window', 'WorkerGlobalScope'] and
82 attribute.name == 'onerror'): 82 attribute.name == 'onerror'):
83 includes.add('bindings/core/v8/V8ErrorHandler.h') 83 includes.add('bindings/core/v8/V8ErrorHandler.h')
84 84
85 context = { 85 context = {
86 'access_control_list': access_control_list(attribute), 86 'access_control_list': access_control_list(attribute),
87 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] 87 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging]
88 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] 88 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging]
89 'activity_logging_include_old_value_for_setter': 'LogPreviousValue' in e xtended_attributes, # [ActivityLogging]
90 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging] 89 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging]
91 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), 90 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True),
92 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'), 91 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'),
93 'conditional_string': v8_utilities.conditional_string(attribute), 92 'conditional_string': v8_utilities.conditional_string(attribute),
94 'constructor_type': idl_type.constructor_type_name 93 'constructor_type': idl_type.constructor_type_name
95 if is_constructor_attribute(attribute) else None, 94 if is_constructor_attribute(attribute) else None,
96 'cpp_name': cpp_name(attribute), 95 'cpp_name': cpp_name(attribute),
97 'cpp_type': idl_type.cpp_type, 96 'cpp_type': idl_type.cpp_type,
98 'cpp_type_initializer': idl_type.cpp_type_initializer, 97 'cpp_type_initializer': idl_type.cpp_type_initializer,
99 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 98 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 raise Exception('Private scripts supports only primitive types and D OM wrappers.') 180 raise Exception('Private scripts supports only primitive types and D OM wrappers.')
182 181
183 context['cpp_value_original'] = cpp_value 182 context['cpp_value_original'] = cpp_value
184 cpp_value = 'result' 183 cpp_value = 'result'
185 # EventHandler has special handling 184 # EventHandler has special handling
186 if base_idl_type != 'EventHandler': 185 if base_idl_type != 'EventHandler':
187 release = idl_type.release 186 release = idl_type.release
188 elif (idl_type.is_explicit_nullable or 187 elif (idl_type.is_explicit_nullable or
189 base_idl_type == 'EventHandler' or 188 base_idl_type == 'EventHandler' or
190 'CachedAttribute' in extended_attributes or 189 'CachedAttribute' in extended_attributes or
191 'LogPreviousValue' in extended_attributes or
192 'ReflectOnly' in extended_attributes or 190 'ReflectOnly' in extended_attributes or
193 context['is_keep_alive_for_gc'] or 191 context['is_keep_alive_for_gc'] or
194 context['is_getter_raises_exception']): 192 context['is_getter_raises_exception']):
195 context['cpp_value_original'] = cpp_value 193 context['cpp_value_original'] = cpp_value
196 cpp_value = 'cppValue' 194 cpp_value = 'cppValue'
197 # EventHandler has special handling 195 # EventHandler has special handling
198 if base_idl_type != 'EventHandler': 196 if base_idl_type != 'EventHandler':
199 release = idl_type.release 197 release = idl_type.release
200 198
201 def v8_set_return_value_statement(for_main_world=False): 199 def v8_set_return_value_statement(for_main_world=False):
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 lambda self: strip_suffix(self.base_type, 'Constructor')) 492 lambda self: strip_suffix(self.base_type, 'Constructor'))
495 493
496 494
497 def is_constructor_attribute(attribute): 495 def is_constructor_attribute(attribute):
498 # FIXME: replace this with [ConstructorAttribute] extended attribute 496 # FIXME: replace this with [ConstructorAttribute] extended attribute
499 return attribute.idl_type.name.endswith('Constructor') 497 return attribute.idl_type.name.endswith('Constructor')
500 498
501 499
502 def constructor_getter_context(interface, attribute, context): 500 def constructor_getter_context(interface, attribute, context):
503 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 501 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698