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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 idl_type.name in ('Float', 'Double'), | 228 idl_type.name in ('Float', 'Double'), |
229 # Dictionary is special-cased, but arrays and sequences shouldn't be | 229 # Dictionary is special-cased, but arrays and sequences shouldn't be |
230 'idl_type': idl_type.base_type, | 230 'idl_type': idl_type.base_type, |
231 'idl_type_object': idl_type, | 231 'idl_type_object': idl_type, |
232 'index': index, | 232 'index': index, |
233 'is_callback_interface': idl_type.is_callback_interface, | 233 'is_callback_interface': idl_type.is_callback_interface, |
234 # FIXME: Remove generic 'Dictionary' special-casing | 234 # FIXME: Remove generic 'Dictionary' special-casing |
235 'is_dictionary': idl_type.is_dictionary or idl_type.base_type == 'Dictio
nary', | 235 'is_dictionary': idl_type.is_dictionary or idl_type.base_type == 'Dictio
nary', |
236 'is_nullable': idl_type.is_nullable, | 236 'is_nullable': idl_type.is_nullable, |
237 'is_optional': argument.is_optional, | 237 'is_optional': argument.is_optional, |
| 238 'is_variadic': argument.is_variadic, |
238 'is_variadic_wrapper_type': is_variadic_wrapper_type, | 239 'is_variadic_wrapper_type': is_variadic_wrapper_type, |
239 'is_wrapper_type': idl_type.is_wrapper_type, | 240 'is_wrapper_type': idl_type.is_wrapper_type, |
240 'name': argument.name, | 241 'name': argument.name, |
241 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( | 242 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( |
242 argument.name, isolate='scriptState->isolate()', | 243 argument.name, isolate='scriptState->isolate()', |
243 creation_context='scriptState->context()->Global()'), | 244 creation_context='scriptState->context()->Global()'), |
244 'v8_set_return_value': v8_set_return_value(interface.name, method, this_
cpp_value), | 245 'v8_set_return_value': v8_set_return_value(interface.name, method, this_
cpp_value), |
245 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), | 246 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), |
246 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind
ex, type_checked, return_promise=method.returns_promise), | 247 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind
ex, type_checked, return_promise=method.returns_promise), |
247 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc
_type), | 248 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc
_type), |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
440 | 441 |
441 IdlOperation.returns_promise = property(method_returns_promise) | 442 IdlOperation.returns_promise = property(method_returns_promise) |
442 | 443 |
443 | 444 |
444 def argument_conversion_needs_exception_state(method, argument): | 445 def argument_conversion_needs_exception_state(method, argument): |
445 idl_type = argument.idl_type | 446 idl_type = argument.idl_type |
446 return (idl_type.v8_conversion_needs_exception_state or | 447 return (idl_type.v8_conversion_needs_exception_state or |
447 argument.is_variadic or | 448 argument.is_variadic or |
448 (method.returns_promise and (idl_type.is_string_type or | 449 (method.returns_promise and (idl_type.is_string_type or |
449 idl_type.is_enum))) | 450 idl_type.is_enum))) |
OLD | NEW |