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

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

Issue 110023002: IDL compiler: [InitializedByEventConstructor] attribute any (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 years 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/scripts/unstable/v8_interface.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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 'is_replaceable': 'Replaceable' in attribute.extended_attributes, 107 'is_replaceable': 'Replaceable' in attribute.extended_attributes,
108 'is_setter_raises_exception': ( 108 'is_setter_raises_exception': (
109 'RaisesException' in extended_attributes and 109 'RaisesException' in extended_attributes and
110 extended_attributes['RaisesException'] in [None, 'Setter']), 110 extended_attributes['RaisesException'] in [None, 'Setter']),
111 'is_static': attribute.is_static, 111 'is_static': attribute.is_static,
112 'is_unforgeable': 'Unforgeable' in extended_attributes, 112 'is_unforgeable': 'Unforgeable' in extended_attributes,
113 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs] 113 'measure_as': v8_utilities.measure_as(attribute), # [MeasureAs]
114 'name': attribute.name, 114 'name': attribute.name,
115 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled] 115 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(attribute), # [PerContextEnabled]
116 'property_attributes': property_attributes(attribute), 116 'property_attributes': property_attributes(attribute),
117 'set_serialized_script_value': 'setSerialized' + capitalize(attribute.na me), # [EventConstructor] on interface
117 'setter_callback': setter_callback_name(interface, attribute), 118 'setter_callback': setter_callback_name(interface, attribute),
118 'v8_type': v8_types.v8_type(idl_type), 119 'v8_type': v8_types.v8_type(idl_type),
119 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a ttribute), # [RuntimeEnabled] 120 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(a ttribute), # [RuntimeEnabled]
120 'world_suffixes': ['', 'ForMainWorld'] 121 'world_suffixes': ['', 'ForMainWorld']
121 if 'PerWorldBindings' in extended_attributes 122 if 'PerWorldBindings' in extended_attributes
122 else [''], # [PerWorldBindings] 123 else [''], # [PerWorldBindings]
123 } 124 }
124 125
125 if is_constructor_attribute(attribute): 126 if is_constructor_attribute(attribute):
126 return contents 127 return contents
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 if ('NotEnumerable' in extended_attributes or 326 if ('NotEnumerable' in extended_attributes or
326 is_constructor_attribute(attribute)): 327 is_constructor_attribute(attribute)):
327 property_attributes_list.append('v8::DontEnum') 328 property_attributes_list.append('v8::DontEnum')
328 if 'Unforgeable' in extended_attributes: 329 if 'Unforgeable' in extended_attributes:
329 property_attributes_list.append('v8::DontDelete') 330 property_attributes_list.append('v8::DontDelete')
330 return property_attributes_list or ['v8::None'] 331 return property_attributes_list or ['v8::None']
331 332
332 333
333 def is_constructor_attribute(attribute): 334 def is_constructor_attribute(attribute):
334 return attribute.idl_type.endswith('Constructor') 335 return attribute.idl_type.endswith('Constructor')
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/scripts/unstable/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698