OLD | NEW |
---|---|
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 'measure_as': v8_utilities.measure_as(method), # [MeasureAs] | 156 'measure_as': v8_utilities.measure_as(method), # [MeasureAs] |
157 'name': name, | 157 'name': name, |
158 'number_of_arguments': len(arguments), | 158 'number_of_arguments': len(arguments), |
159 'number_of_required_arguments': len([ | 159 'number_of_required_arguments': len([ |
160 argument for argument in arguments | 160 argument for argument in arguments |
161 if not (argument.is_optional or argument.is_variadic)]), | 161 if not (argument.is_optional or argument.is_variadic)]), |
162 'number_of_required_or_variadic_arguments': len([ | 162 'number_of_required_or_variadic_arguments': len([ |
163 argument for argument in arguments | 163 argument for argument in arguments |
164 if not argument.is_optional]), | 164 if not argument.is_optional]), |
165 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(method), # [PerContextEnabled] | 165 'per_context_enabled_function': v8_utilities.per_context_enabled_functio n_name(method), # [PerContextEnabled] |
166 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local _cpp_value( | |
167 extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->is olate()', used_in_private_script=True), | |
166 'property_attributes': property_attributes(method), | 168 'property_attributes': property_attributes(method), |
167 'raw_cpp_type': idl_type.cpp_type_args(raw_type=True), | 169 'raw_cpp_type': idl_type.cpp_type_args(raw_type=True), |
Jens Widell
2014/07/03 11:33:14
This becomes unused now, I think.
haraken
2014/07/03 11:56:09
Removed.
| |
168 'returned_v8_value_to_local_cpp_value': v8_types.v8_value_to_cpp_value( | |
169 idl_type, extended_attributes, 'v8Value', 0, isolate='scriptState->i solate()'), | |
170 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(m ethod), # [RuntimeEnabled] | 170 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(m ethod), # [RuntimeEnabled] |
171 'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSig nature' in extended_attributes else 'defaultSignature', | 171 'signature': 'v8::Local<v8::Signature>()' if is_static or 'DoNotCheckSig nature' in extended_attributes else 'defaultSignature', |
172 'union_arguments': idl_type.union_arguments, | 172 'union_arguments': idl_type.union_arguments, |
173 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), | 173 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), |
174 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), | 174 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), |
175 'world_suffixes': ['', 'ForMainWorld'] if 'PerWorldBindings' in extended _attributes else [''], # [PerWorldBindings], | 175 'world_suffixes': ['', 'ForMainWorld'] if 'PerWorldBindings' in extended _attributes else [''], # [PerWorldBindings], |
176 } | 176 } |
177 | 177 |
178 | 178 |
179 def argument_context(interface, method, argument, index): | 179 def argument_context(interface, method, argument, index): |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 | 377 |
378 | 378 |
379 def argument_default_cpp_value(argument): | 379 def argument_default_cpp_value(argument): |
380 if not argument.default_value: | 380 if not argument.default_value: |
381 return None | 381 return None |
382 return argument.idl_type.literal_cpp_value(argument.default_value) | 382 return argument.idl_type.literal_cpp_value(argument.default_value) |
383 | 383 |
384 IdlType.union_arguments = property(lambda self: None) | 384 IdlType.union_arguments = property(lambda self: None) |
385 IdlUnionType.union_arguments = property(union_arguments) | 385 IdlUnionType.union_arguments = property(union_arguments) |
386 IdlArgument.default_cpp_value = property(argument_default_cpp_value) | 386 IdlArgument.default_cpp_value = property(argument_default_cpp_value) |
OLD | NEW |