| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 # [CallWith=ScriptState], [RaisesException] | 354 # [CallWith=ScriptState], [RaisesException] |
| 355 if use_local_result(method): | 355 if use_local_result(method): |
| 356 if idl_type.is_explicit_nullable: | 356 if idl_type.is_explicit_nullable: |
| 357 # result is of type Nullable<T> | 357 # result is of type Nullable<T> |
| 358 cpp_value = 'result.get()' | 358 cpp_value = 'result.get()' |
| 359 else: | 359 else: |
| 360 cpp_value = 'result' | 360 cpp_value = 'result' |
| 361 release = idl_type.release | 361 release = idl_type.release |
| 362 | 362 |
| 363 script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else
'' | 363 script_wrappable = 'impl' if inherits_interface(interface_name, 'Node') else
'' |
| 364 return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_w
rappable=script_wrappable, release=release, for_main_world=for_main_world) | 364 return idl_type.v8_set_return_value(cpp_value, extended_attributes, script_w
rappable=script_wrappable, release=release, for_main_world=for_main_world, is_st
atic=method.is_static) |
| 365 | 365 |
| 366 | 366 |
| 367 def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise
): | 367 def v8_value_to_local_cpp_variadic_value(method, argument, index, return_promise
): |
| 368 assert argument.is_variadic | 368 assert argument.is_variadic |
| 369 idl_type = argument.idl_type | 369 idl_type = argument.idl_type |
| 370 this_cpp_type = idl_type.cpp_type | 370 this_cpp_type = idl_type.cpp_type |
| 371 | 371 |
| 372 if method.returns_promise: | 372 if method.returns_promise: |
| 373 check_expression = 'exceptionState.hadException()' | 373 check_expression = 'exceptionState.hadException()' |
| 374 else: | 374 else: |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 466 return method.idl_type and method.idl_type.name == 'Promise' | 466 return method.idl_type and method.idl_type.name == 'Promise' |
| 467 | 467 |
| 468 IdlOperation.returns_promise = property(method_returns_promise) | 468 IdlOperation.returns_promise = property(method_returns_promise) |
| 469 | 469 |
| 470 | 470 |
| 471 def argument_conversion_needs_exception_state(method, argument): | 471 def argument_conversion_needs_exception_state(method, argument): |
| 472 idl_type = argument.idl_type | 472 idl_type = argument.idl_type |
| 473 return (idl_type.v8_conversion_needs_exception_state or | 473 return (idl_type.v8_conversion_needs_exception_state or |
| 474 argument.is_variadic or | 474 argument.is_variadic or |
| 475 (method.returns_promise and idl_type.is_string_type)) | 475 (method.returns_promise and idl_type.is_string_type)) |
| OLD | NEW |