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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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': argument.is_variadic, |
239 'is_variadic_wrapper_type': is_variadic_wrapper_type, | 239 'is_variadic_wrapper_type': is_variadic_wrapper_type, |
240 'is_wrapper_type': idl_type.is_wrapper_type, | 240 'is_wrapper_type': idl_type.is_wrapper_type, |
241 'name': argument.name, | 241 'name': argument.name, |
242 '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( |
243 argument.name, isolate='scriptState->isolate()', | 243 argument.name, isolate='scriptState->isolate()', |
244 creation_context='scriptState->context()->Global()'), | 244 creation_context='scriptState->context()->Global()'), |
| 245 'use_permissive_dictionary_conversion': 'PermissiveDictionaryConversion'
in extended_attributes, |
245 'v8_set_return_value': v8_set_return_value(interface.name, method, this_
cpp_value), | 246 'v8_set_return_value': v8_set_return_value(interface.name, method, this_
cpp_value), |
246 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), | 247 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name
, method, this_cpp_value, for_main_world=True), |
247 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind
ex, type_checked, return_promise=method.returns_promise), | 248 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind
ex, type_checked, return_promise=method.returns_promise), |
248 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc
_type), | 249 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc
_type), |
249 } | 250 } |
250 | 251 |
251 | 252 |
252 def argument_declarations_for_private_script(interface, method): | 253 def argument_declarations_for_private_script(interface, method): |
253 argument_declarations = ['LocalFrame* frame'] | 254 argument_declarations = ['LocalFrame* frame'] |
254 argument_declarations.append('%s* holderImpl' % interface.name) | 255 argument_declarations.append('%s* holderImpl' % interface.name) |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
441 | 442 |
442 IdlOperation.returns_promise = property(method_returns_promise) | 443 IdlOperation.returns_promise = property(method_returns_promise) |
443 | 444 |
444 | 445 |
445 def argument_conversion_needs_exception_state(method, argument): | 446 def argument_conversion_needs_exception_state(method, argument): |
446 idl_type = argument.idl_type | 447 idl_type = argument.idl_type |
447 return (idl_type.v8_conversion_needs_exception_state or | 448 return (idl_type.v8_conversion_needs_exception_state or |
448 argument.is_variadic or | 449 argument.is_variadic or |
449 (method.returns_promise and (idl_type.is_string_type or | 450 (method.returns_promise and (idl_type.is_string_type or |
450 idl_type.is_enum))) | 451 idl_type.is_enum))) |
OLD | NEW |