| Index: Source/bindings/scripts/v8_methods.py
|
| diff --git a/Source/bindings/scripts/v8_methods.py b/Source/bindings/scripts/v8_methods.py
|
| index 69ba2c1239e59e01df2889ca92611b6780aa739d..3f696d7ea86aab5011f4adc28dbe1a6fe00f163e 100644
|
| --- a/Source/bindings/scripts/v8_methods.py
|
| +++ b/Source/bindings/scripts/v8_methods.py
|
| @@ -174,6 +174,7 @@ def generate_argument(interface, method, argument, index):
|
| 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name, method, this_cpp_value, for_main_world=True),
|
| 'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value),
|
| 'v8_value_to_local_cpp_value': v8_value_to_local_cpp_value(argument, index),
|
| + 'v8_value_to_local_cpp_value_async': v8_value_to_local_cpp_value_async(argument, index),
|
| }
|
|
|
|
|
| @@ -255,6 +256,24 @@ def v8_value_to_local_cpp_value(argument, index):
|
| v8_value, name, index=index)
|
|
|
|
|
| +def v8_value_to_local_cpp_value_async(argument, index):
|
| + extended_attributes = argument.extended_attributes
|
| + idl_type = argument.idl_type
|
| + name = argument.name
|
| + if argument.is_variadic:
|
| + vector_type = 'WillBeHeapVector' if idl_type.is_will_be_garbage_collected else 'Vector'
|
| + return 'V8TRYCATCH_VOID_PROMISE({vector_type}<{cpp_type}>, {name}, toNativeArguments<{cpp_type}>(info, {index}), info)'.format(
|
| + cpp_type=idl_type.cpp_type, name=name, index=index, vector_type=vector_type)
|
| + # [Default=NullString]
|
| + if (argument.is_optional and idl_type.name == 'String' and
|
| + extended_attributes.get('Default') == 'NullString'):
|
| + v8_value = 'argumentOrNull(info, %s)' % index
|
| + else:
|
| + v8_value = 'info[%s]' % index
|
| + return idl_type.v8_value_to_local_cpp_value_async(argument.extended_attributes,
|
| + v8_value, name, index=index)
|
| +
|
| +
|
| ################################################################################
|
| # Auxiliary functions
|
| ################################################################################
|
|
|