void NPVariantData::encode(CoreIPC::ArgumentEncoder* encoder) const
{
    encoder->encode(m_type);

    switch (type()) {
    case NPVariantData::Void:
    case NPVariantData::Null:
        break;
    case NPVariantData::Bool:
        encoder->encode(boolValue());
        break;
    case NPVariantData::Int32:
        encoder->encode(int32Value());
        break;
    case NPVariantData::Double:
        encoder->encode(doubleValue());
        break;
    case NPVariantData::String:
        encoder->encode(stringValue());
        break;
    case NPVariantData::LocalNPObjectID:
        encoder->encode(localNPObjectIDValue());
        break;
    case NPVariantData::RemoteNPObjectID:
        encoder->encode(remoteNPObjectIDValue());
        break;
    }
}
Beispiel #2
0
void NPVariantData::encode(CoreIPC::ArgumentEncoder& encoder) const
{
    encoder << m_type;

    switch (type()) {
    case NPVariantData::Void:
    case NPVariantData::Null:
        break;
    case NPVariantData::Bool:
        encoder << boolValue();
        break;
    case NPVariantData::Int32:
        encoder << int32Value();
        break;
    case NPVariantData::Double:
        encoder << doubleValue();
        break;
    case NPVariantData::String:
        encoder << stringValue();
        break;
    case NPVariantData::LocalNPObjectID:
        encoder << localNPObjectIDValue();
        break;
    case NPVariantData::RemoteNPObjectID:
        encoder << remoteNPObjectIDValue();
        break;
    }
}