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

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

Issue 313993002: Bindings: Add ScalarValueString support (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 6 years, 6 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 | Annotate | Revision Log
« 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 'cpp_name': cpp_name(attribute), 102 'cpp_name': cpp_name(attribute),
103 'cpp_type': idl_type.cpp_type, 103 'cpp_type': idl_type.cpp_type,
104 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='origi nal', creation_context='info.Holder()'), 104 'cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value(cpp_value='origi nal', creation_context='info.Holder()'),
105 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 105 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
106 'enum_validation_expression': idl_type.enum_validation_expression, 106 'enum_validation_expression': idl_type.enum_validation_expression,
107 'has_custom_getter': has_custom_getter, 107 'has_custom_getter': has_custom_getter,
108 'has_custom_setter': has_custom_setter, 108 'has_custom_setter': has_custom_setter,
109 'has_setter_exception_state': 109 'has_setter_exception_state':
110 is_setter_raises_exception or has_type_checking_interface or 110 is_setter_raises_exception or has_type_checking_interface or
111 has_type_checking_nullable or has_type_checking_unrestricted or 111 has_type_checking_nullable or has_type_checking_unrestricted or
112 idl_type.is_integer_type or idl_type.name == 'ByteString', 112 idl_type.is_integer_type or
113 idl_type.name in ('ByteString', 'ScalarValueString'),
113 'has_type_checking_interface': has_type_checking_interface, 114 'has_type_checking_interface': has_type_checking_interface,
114 'has_type_checking_nullable': has_type_checking_nullable, 115 'has_type_checking_nullable': has_type_checking_nullable,
115 'has_type_checking_unrestricted': has_type_checking_unrestricted, 116 'has_type_checking_unrestricted': has_type_checking_unrestricted,
116 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType 117 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType
117 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'), 118 'is_call_with_execution_context': v8_utilities.has_extended_attribute_va lue(attribute, 'CallWith', 'ExecutionContext'),
118 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'), 119 'is_call_with_script_state': v8_utilities.has_extended_attribute_value(a ttribute, 'CallWith', 'ScriptState'),
119 'is_check_security_for_node': is_check_security_for_node, 120 'is_check_security_for_node': is_check_security_for_node,
120 'is_custom_element_callbacks': is_custom_element_callbacks, 121 'is_custom_element_callbacks': is_custom_element_callbacks,
121 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, 122 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes,
122 'is_getter_raises_exception': # [RaisesException] 123 'is_getter_raises_exception': # [RaisesException]
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 lambda self: strip_suffix(self.base_type, 'Constructor')) 427 lambda self: strip_suffix(self.base_type, 'Constructor'))
427 428
428 429
429 def is_constructor_attribute(attribute): 430 def is_constructor_attribute(attribute):
430 # FIXME: replace this with [ConstructorAttribute] extended attribute 431 # FIXME: replace this with [ConstructorAttribute] extended attribute
431 return attribute.idl_type.base_type.endswith('Constructor') 432 return attribute.idl_type.base_type.endswith('Constructor')
432 433
433 434
434 def generate_constructor_getter(interface, attribute, contents): 435 def generate_constructor_getter(interface, attribute, contents):
435 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as'] 436 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['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