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

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

Issue 390223004: initialize result variables in v8 bindings (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fixups for jens Created 6 years, 5 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
« no previous file with comments | « Source/bindings/scripts/idl_types.py ('k') | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
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] 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] 90 'activity_logging_world_check': v8_utilities.activity_logging_world_chec k(attribute), # [ActivityLogging]
91 'argument_cpp_type': idl_type.cpp_type_args(used_as_argument=True), 91 'argument_cpp_type': idl_type.cpp_type_args(used_as_argument=True),
92 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'), 92 'cached_attribute_validation_method': extended_attributes.get('CachedAtt ribute'),
93 'conditional_string': v8_utilities.conditional_string(attribute), 93 'conditional_string': v8_utilities.conditional_string(attribute),
94 'constructor_type': idl_type.constructor_type_name 94 'constructor_type': idl_type.constructor_type_name
95 if is_constructor_attribute(attribute) else None, 95 if is_constructor_attribute(attribute) else None,
96 'cpp_name': cpp_name(attribute), 96 'cpp_name': cpp_name(attribute),
97 'cpp_type': idl_type.cpp_type, 97 'cpp_type': idl_type.cpp_type,
98 'cpp_type_initializer': idl_type.cpp_type_initializer,
98 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 99 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
99 'enum_validation_expression': idl_type.enum_validation_expression, 100 'enum_validation_expression': idl_type.enum_validation_expression,
100 'has_custom_getter': has_custom_getter, 101 'has_custom_getter': has_custom_getter,
101 'has_custom_setter': has_custom_setter, 102 'has_custom_setter': has_custom_setter,
102 'has_type_checking_unrestricted': has_type_checking_unrestricted, 103 'has_type_checking_unrestricted': has_type_checking_unrestricted,
103 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType 104 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType
104 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'), 105 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'),
105 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'), 106 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'),
106 'is_check_security_for_node': is_check_security_for_node, 107 'is_check_security_for_node': is_check_security_for_node,
107 'is_custom_element_callbacks': is_custom_element_callbacks, 108 'is_custom_element_callbacks': is_custom_element_callbacks,
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 lambda self: strip_suffix(self.base_type, 'Constructor')) 476 lambda self: strip_suffix(self.base_type, 'Constructor'))
476 477
477 478
478 def is_constructor_attribute(attribute): 479 def is_constructor_attribute(attribute):
479 # FIXME: replace this with [ConstructorAttribute] extended attribute 480 # FIXME: replace this with [ConstructorAttribute] extended attribute
480 return attribute.idl_type.base_type.endswith('Constructor') 481 return attribute.idl_type.base_type.endswith('Constructor')
481 482
482 483
483 def constructor_getter_context(interface, attribute, context): 484 def constructor_getter_context(interface, attribute, context):
484 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as'] 485 context['needs_constructor_getter_callback'] = context['measure_as'] or cont ext['deprecate_as']
OLDNEW
« no previous file with comments | « Source/bindings/scripts/idl_types.py ('k') | Source/bindings/scripts/v8_methods.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698