Ejemplo n.º 1
0
def v8_value_to_local_cpp_variadic_value(argument, index):
    assert argument.is_variadic
    idl_type = v8_types.native_value_traits_type_name(argument.idl_type,
                                                      argument.extended_attributes, True)

    return {
        'assign_expression': 'ToImplArguments<%s>(info, %s, exceptionState)' % (idl_type, index),
        'check_expression': 'exceptionState.HadException()',
        'cpp_name': argument.name,
        'declare_variable': False,
    }
Ejemplo n.º 2
0
def v8_value_to_local_cpp_variadic_value(argument, index):
    assert argument.is_variadic
    idl_type = v8_types.native_value_traits_type_name(
        argument.idl_type, argument.extended_attributes, True)
    execution_context_if_needed = ''
    if argument.idl_type.has_string_context:
        execution_context_if_needed = ', bindings::ExecutionContextFromV8Wrappable(impl)'
    assign_expression = 'ToImplArguments<%s>(info, %s, exception_state%s)' % (
        idl_type, index, execution_context_if_needed)
    return {
        'assign_expression': assign_expression,
        'check_expression': 'exception_state.HadException()',
        'cpp_name': NameStyleConverter(argument.name).to_snake_case(),
        'declare_variable': False,
    }