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

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

Issue 236783002: Pass NewScriptState to idbAnyToScriptValue() and idbKeyToScriptValue() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/bindings/templates/attributes.cpp » ('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 if is_constructor_attribute(attribute) else None, 88 if is_constructor_attribute(attribute) else None,
89 'cpp_name': cpp_name(attribute), 89 'cpp_name': cpp_name(attribute),
90 'cpp_type': idl_type.cpp_type, 90 'cpp_type': idl_type.cpp_type,
91 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs] 91 'deprecate_as': v8_utilities.deprecate_as(attribute), # [DeprecateAs]
92 'enum_validation_expression': idl_type.enum_validation_expression, 92 'enum_validation_expression': idl_type.enum_validation_expression,
93 'has_custom_getter': has_custom_getter, 93 'has_custom_getter': has_custom_getter,
94 'has_custom_setter': has_custom_setter, 94 'has_custom_setter': has_custom_setter,
95 'has_strict_type_checking': has_strict_type_checking, 95 'has_strict_type_checking': has_strict_type_checking,
96 'idl_type': str(idl_type), # need trailing [] on array for Dictionary:: ConversionContext::setConversionType 96 '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'), 97 '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'),
98 'is_check_security_for_node': is_check_security_for_node, 99 'is_check_security_for_node': is_check_security_for_node,
99 'is_custom_element_callbacks': is_custom_element_callbacks, 100 'is_custom_element_callbacks': is_custom_element_callbacks,
100 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes, 101 'is_expose_js_accessors': 'ExposeJSAccessors' in extended_attributes,
101 'is_getter_raises_exception': ( # [RaisesException] 102 'is_getter_raises_exception': ( # [RaisesException]
102 'RaisesException' in extended_attributes and 103 'RaisesException' in extended_attributes and
103 extended_attributes['RaisesException'] in [None, 'Getter']), 104 extended_attributes['RaisesException'] in [None, 'Getter']),
104 'is_initialized_by_event_constructor': 105 'is_initialized_by_event_constructor':
105 'InitializedByEventConstructor' in extended_attributes, 106 'InitializedByEventConstructor' in extended_attributes,
106 'is_keep_alive_for_gc': is_keep_alive_for_gc(interface, attribute), 107 'is_keep_alive_for_gc': is_keep_alive_for_gc(interface, attribute),
107 'is_nullable': attribute.idl_type.is_nullable, 108 'is_nullable': attribute.idl_type.is_nullable,
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 lambda self: strip_suffix(self.base_type, 'Constructor')) 405 lambda self: strip_suffix(self.base_type, 'Constructor'))
405 406
406 407
407 def is_constructor_attribute(attribute): 408 def is_constructor_attribute(attribute):
408 # FIXME: replace this with [ConstructorAttribute] extended attribute 409 # FIXME: replace this with [ConstructorAttribute] extended attribute
409 return attribute.idl_type.base_type.endswith('Constructor') 410 return attribute.idl_type.base_type.endswith('Constructor')
410 411
411 412
412 def generate_constructor_getter(interface, attribute, contents): 413 def generate_constructor_getter(interface, attribute, contents):
413 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as'] 414 contents['needs_constructor_getter_callback'] = contents['measure_as'] or co ntents['deprecate_as']
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/templates/attributes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698