static void partialVoidTestEnumModulesArgMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
    ExceptionState exceptionState(ExceptionState::ExecutionContext, "partialVoidTestEnumModulesArgMethod", "TestInterface", info.Holder(), info.GetIsolate());
    if (UNLIKELY(info.Length() < 1)) {
        setMinimumArityTypeError(exceptionState, 1, info.Length());
        exceptionState.throwIfNeeded();
        return;
    }
    TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder());
    V8StringResource<> arg;
    {
        arg = info[0];
        if (!arg.prepare())
            return;
        const char* validValues[] = {
            "EnumModulesValue1",
            "EnumModulesValue2",
        };
        if (!isValidEnum(arg, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnumModules", exceptionState)) {
            exceptionState.throwIfNeeded();
            return;
        }
    }
    TestPartialInterfaceImplementation3::partialVoidTestEnumModulesArgMethod(*impl, arg);
}
示例#2
0
bool PageState::decode(IPC::ArgumentDecoder& decoder, PageState& result)
{
    if (!decoder.decode(result.title))
        return false;
    if (!decoder.decode(result.mainFrameState))
        return false;
    if (!decoder.decodeEnum(result.shouldOpenExternalURLsPolicy) || !isValidEnum(result.shouldOpenExternalURLsPolicy))
        return false;

    return true;
}
示例#3
0
bool HTTPBody::Element::decode(IPC::ArgumentDecoder& decoder, Element& result)
{
    if (!decoder.decodeEnum(result.type) || !isValidEnum(result.type))
        return false;
    if (!decoder.decode(result.data))
        return false;
    if (!decoder.decode(result.filePath))
        return false;
    if (!decoder.decode(result.fileStart))
        return false;
    if (!decoder.decode(result.fileLength))
        return false;
    if (!decoder.decode(result.expectedFileModificationTime))
        return false;
    if (!decoder.decode(result.blobURLString))
        return false;

    return true;
}