Exemplo n.º 1
0
def constructor_context(interface, constructor):
    return {
        'arguments': [
            dart_methods.argument_context(interface, constructor, argument,
                                          index)
            for index, argument in enumerate(constructor.arguments)
        ],
        'auto_scope':
        'true',
        'cpp_value':
        dart_methods.cpp_value(interface, constructor,
                               len(constructor.arguments)),
        'has_exception_state':
        # [RaisesException=Constructor]
        interface.extended_attributes.get('RaisesException') == 'Constructor'
        or any(argument for argument in constructor.arguments
               if argument.idl_type.name == 'SerializedScriptValue'
               or argument.idl_type.is_integer_type),
        'is_auto_scope':
        True,
        'is_call_with_script_arguments':
        False,
        'is_constructor':
        True,
        'is_custom':
        False,
        'is_variadic':
        False,  # Required for overload resolution
        'number_of_required_arguments':
        v8_interface.number_of_required_arguments(constructor),
        'number_of_arguments':
        len(constructor.arguments),
    }
Exemplo n.º 2
0
def custom_constructor_context(interface, constructor):
    return {
        'arguments': [custom_constructor_argument(argument, index)
                      for index, argument in enumerate(constructor.arguments)],
        'auto_scope': 'true',
        'is_auto_scope': True,
        'is_call_with_script_arguments': False,
        'is_custom': True,
        'number_of_arguments': len(constructor.arguments),
        'number_of_required_arguments':
            v8_interface.number_of_required_arguments(constructor),
        }
Exemplo n.º 3
0
def custom_constructor_context(interface, constructor):
    return {
        "arguments": [
            custom_constructor_argument(argument, index) for index, argument in enumerate(constructor.arguments)
        ],
        "auto_scope": "true",
        "is_auto_scope": True,
        "is_call_with_script_arguments": False,
        "is_custom": True,
        "number_of_arguments": len(constructor.arguments),
        "number_of_required_arguments": v8_interface.number_of_required_arguments(constructor),
    }
Exemplo n.º 4
0
def custom_constructor_context(interface, constructor):
    return {
        'arguments': [custom_constructor_argument(argument, index)
                      for index, argument in enumerate(constructor.arguments)],
        'auto_scope': 'true',
        'is_auto_scope': True,
        'is_call_with_script_arguments': False,
        'is_custom': True,
        'number_of_arguments': len(constructor.arguments),
        'number_of_required_arguments':
            v8_interface.number_of_required_arguments(constructor),
        }
Exemplo n.º 5
0
def constructor_context(interface, constructor):
    return {
        'arguments': [dart_methods.argument_context(interface, constructor, argument, index)
                      for index, argument in enumerate(constructor.arguments)],
        'auto_scope': 'true',
        'cpp_value': dart_methods.cpp_value(
            interface, constructor, len(constructor.arguments)),
        'has_exception_state':
            # [RaisesException=Constructor]
            interface.extended_attributes.get('RaisesException') == 'Constructor' or
            any(argument for argument in constructor.arguments
                if argument.idl_type.name == 'SerializedScriptValue' or
                   argument.idl_type.is_integer_type),
        'is_auto_scope': True,
        'is_call_with_script_arguments': False,
        'is_constructor': True,
        'is_custom': False,
        'is_variadic': False,  # Required for overload resolution
        'number_of_required_arguments':
            v8_interface.number_of_required_arguments(constructor),
        'number_of_arguments': len(constructor.arguments),
    }
Exemplo n.º 6
0
def constructor_context(interface, constructor):
    return {
        "arguments": [
            dart_methods.argument_context(interface, constructor, argument, index)
            for index, argument in enumerate(constructor.arguments)
        ],
        "auto_scope": "true",
        "cpp_value": dart_methods.cpp_value(interface, constructor, len(constructor.arguments)),
        "has_exception_state":
        # [RaisesException=Constructor]
        interface.extended_attributes.get("RaisesException") == "Constructor"
        or any(
            argument
            for argument in constructor.arguments
            if argument.idl_type.name == "SerializedScriptValue" or argument.idl_type.is_integer_type
        ),
        "is_auto_scope": True,
        "is_call_with_script_arguments": False,
        "is_constructor": True,
        "is_custom": False,
        "is_variadic": False,  # Required for overload resolution
        "number_of_required_arguments": v8_interface.number_of_required_arguments(constructor),
        "number_of_arguments": len(constructor.arguments),
    }