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

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

Issue 213783002: Pass current value of attributes to WebDOMActivityLogger Setter logs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Nils's Created 6 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 if (base_idl_type == 'EventHandler' and 76 if (base_idl_type == 'EventHandler' and
77 interface.name in ['Window', 'WorkerGlobalScope'] and 77 interface.name in ['Window', 'WorkerGlobalScope'] and
78 attribute.name == 'onerror'): 78 attribute.name == 'onerror'):
79 includes.add('bindings/v8/V8ErrorHandler.h') 79 includes.add('bindings/v8/V8ErrorHandler.h')
80 80
81 contents = { 81 contents = {
82 'access_control_list': access_control_list(attribute), 82 'access_control_list': access_control_list(attribute),
83 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging] 83 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_ world_list(attribute, 'Getter'), # [ActivityLogging]
84 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging] 84 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_ world_list(attribute, 'Setter'), # [ActivityLogging]
85 'activity_logging_include_old_value_for_setter': ('LogPreviousValue' in extended_attributes), # [ActivityLogging]
Nils Barth (inactive) 2014/04/23 03:04:42 No parentheses. (Only need if doing line continuat
Devlin 2014/04/23 18:28:02 Done.
85 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'), 86 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'),
86 'conditional_string': v8_utilities.conditional_string(attribute), 87 'conditional_string': v8_utilities.conditional_string(attribute),
87 'constructor_type': idl_type.constructor_type_name 88 'constructor_type': idl_type.constructor_type_name
88 if is_constructor_attribute(attribute) else None, 89 if is_constructor_attribute(attribute) else None,
89 'cpp_name': cpp_name(attribute), 90 'cpp_name': cpp_name(attribute),
90 'cpp_type': idl_type.cpp_type, 91 'cpp_type': idl_type.cpp_type,
92 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='origi nal', isolate='info.GetIsolate()', creation_context='v8::Handle<v8::Object>()'),
Nils Barth (inactive) 2014/04/23 03:04:42 Don't need isolate='info.GetIsolate()', as that's
Devlin 2014/04/23 18:28:02 Ah, so it is. Removed.
91 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 93 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
92 'enum_validation_expression': idl_type.enum_validation_expression, 94 'enum_validation_expression': idl_type.enum_validation_expression,
93 'has_custom_getter': has_custom_getter, 95 'has_custom_getter': has_custom_getter,
94 'has_custom_setter': has_custom_setter, 96 'has_custom_setter': has_custom_setter,
95 'has_strict_type_checking': has_strict_type_checking, 97 'has_strict_type_checking': has_strict_type_checking,
96 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType 98 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType
97 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'), 99 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'),
98 'is_call_with_new_script_state': v8_utilities.has_extended_attribute_val ue(attribute, 'CallWith', 'NewScriptState'), 100 'is_call_with_new_script_state': v8_utilities.has_extended_attribute_val ue(attribute, 'CallWith', 'NewScriptState'),
99 'is_check_security_for_node': is_check_security_for_node, 101 'is_check_security_for_node': is_check_security_for_node,
100 'is_custom_element_callbacks': is_custom_element_callbacks, 102 'is_custom_element_callbacks': is_custom_element_callbacks,
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 lambda self: strip_suffix(self.base_type, 'Constructor')) 407 lambda self: strip_suffix(self.base_type, 'Constructor'))
406 408
407 409
408 def is_constructor_attribute(attribute): 410 def is_constructor_attribute(attribute):
409 # FIXME: replace this with [ConstructorAttribute] extended attribute 411 # FIXME: replace this with [ConstructorAttribute] extended attribute
410 return attribute.idl_type.base_type.endswith('Constructor') 412 return attribute.idl_type.base_type.endswith('Constructor')
411 413
412 414
413 def generate_constructor_getter(interface, attribute, contents): 415 def generate_constructor_getter(interface, attribute, contents):
414 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as'] 416 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as']
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698