Chromium Code Reviews| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 'is_variadic_wrapper_type': is_variadic_wrapper_type, | 229 'is_variadic_wrapper_type': is_variadic_wrapper_type, |
| 230 'is_wrapper_type': idl_type.is_wrapper_type, | 230 'is_wrapper_type': idl_type.is_wrapper_type, |
| 231 'name': argument.name, | 231 'name': argument.name, |
| 232 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( | 232 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( |
| 233 argument.name, isolate='scriptState->isolate()', | 233 argument.name, isolate='scriptState->isolate()', |
| 234 creation_context='scriptState->context()->Global()'), | 234 creation_context='scriptState->context()->Global()'), |
| 235 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), | 235 'v8_set_return_value': v8_set_return_value(interface.name, method, this_ cpp_value), |
| 236 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), | 236 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name , method, this_cpp_value, for_main_world=True), |
| 237 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind ex, return_promise=method.returns_promise), | 237 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, ind ex, return_promise=method.returns_promise), |
| 238 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc _type), | 238 'vector_type': v8_types.cpp_ptr_type('Vector', 'HeapVector', idl_type.gc _type), |
| 239 'type_checked_already': False, | |
|
Jens Widell
2014/10/10 10:14:53
Move this up a bit; the list should be sorted alph
yunchao
2014/10/10 11:40:48
Done.
| |
| 239 } | 240 } |
| 240 | 241 |
| 241 | 242 |
| 242 def argument_declarations_for_private_script(interface, method): | 243 def argument_declarations_for_private_script(interface, method): |
| 243 argument_declarations = ['LocalFrame* frame'] | 244 argument_declarations = ['LocalFrame* frame'] |
| 244 argument_declarations.append('%s* holderImpl' % interface.name) | 245 argument_declarations.append('%s* holderImpl' % interface.name) |
| 245 argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args( | 246 argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args( |
| 246 used_as_rvalue_type=True), argument.name) for argument in method.argumen ts]) | 247 used_as_rvalue_type=True), argument.name) for argument in method.argumen ts]) |
| 247 if method.idl_type.name != 'void': | 248 if method.idl_type.name != 'void': |
| 248 argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'resu lt')) | 249 argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'resu lt')) |
| (...skipping 192 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 |