//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/dom/PBackgroundLSSnapshotParent.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/localstorage/SerializationHelpers.h"

#include "mozilla/ipc/PBackgroundParent.h"
#include "mozilla/dom/PBackgroundLSDatabaseParent.h"

#include "ipc/IPCMessageUtils.h"
#include "ipc/IPCMessageUtilsSpecializations.h"
#include "nsIFile.h"
#include "mozilla/ipc/Endpoint.h"
#include "mozilla/ipc/ProtocolMessageUtils.h"
#include "mozilla/ipc/ProtocolUtils.h"
#include "mozilla/ipc/ShmemMessageUtils.h"
#include "mozilla/ipc/TaintingIPCUtils.h"

namespace mozilla {
namespace dom {


MOZ_IMPLICIT PBackgroundLSSnapshotParent::PBackgroundLSSnapshotParent() :
    mozilla::ipc::IProtocol(kProtocolId, mozilla::ipc::ParentSide)
{
    MOZ_COUNT_CTOR(PBackgroundLSSnapshotParent);
}

PBackgroundLSSnapshotParent::~PBackgroundLSSnapshotParent()
{
    MOZ_COUNT_DTOR(PBackgroundLSSnapshotParent);
}

auto PBackgroundLSSnapshotParent::ActorAlloc() -> void
{
}

auto PBackgroundLSSnapshotParent::ActorDealloc() -> void
{
    if (Manager()) {
        Manager()->DeallocManagee(kProtocolId, this);
    }
}

auto PBackgroundLSSnapshotParent::Manager() const -> PBackgroundLSDatabaseParent*
{
    return static_cast<PBackgroundLSDatabaseParent*>(IProtocol::Manager());
}

auto PBackgroundLSSnapshotParent::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    return {};
}

auto PBackgroundLSSnapshotParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    default:
        return nullptr;
    }
}

auto PBackgroundLSSnapshotParent::SendMarkDirty() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackgroundLSSnapshot::Msg_MarkDirty(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundLSSnapshotParent",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_MarkDirty", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PBackgroundLSSnapshotParent::Send__delete__(PBackgroundLSSnapshotParent* actor) -> bool
{
    if (!actor || !actor->CanSend()) {
        NS_WARNING("Attempt to __delete__ missing or closed actor");
        return false;
    }
    UniquePtr<IPC::Message> msg__ = PBackgroundLSSnapshot::Msg___delete__((actor)->Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            actor};


    if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundLSSnapshotParent",
            actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg___delete__", OTHER);

    bool sendok__ = (actor)->ChannelSend(std::move(msg__));

    actor->ActorDisconnected(Deletion);
    return sendok__;
}

auto PBackgroundLSSnapshotParent::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    FatalError("unreached");
    return;
}

auto PBackgroundLSSnapshotParent::OnMessageReceived(const Message& msg__) -> PBackgroundLSSnapshotParent::Result
{
    switch (msg__.type()) {
    case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            return MsgProcessed;
        }
    case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            this->ActorDisconnected(ManagedEndpointDropped);
            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_DeleteMe__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_DeleteMe", OTHER);

            mozilla::ipc::IPCResult __ok = (this)->RecvDeleteMe();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_AsyncCheckpoint__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_AsyncCheckpoint", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__writeInfos = IPC::ReadParam<nsTArray<LSWriteInfo>>((&(reader__)));
            if (!maybe__writeInfos) {
                FatalError("Error deserializing 'LSWriteInfo[]'");
                return MsgValueError;

            }
            auto& writeInfos = *maybe__writeInfos;
            // Sentinel = 'writeInfos'
            if ((!(((&(reader__)))->ReadSentinel(388760619)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LSWriteInfo[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvAsyncCheckpoint(std::move(writeInfos));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_AsyncCheckpointAndNotify__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_AsyncCheckpointAndNotify", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__writeAndNotifyInfos = IPC::ReadParam<nsTArray<LSWriteAndNotifyInfo>>((&(reader__)));
            if (!maybe__writeAndNotifyInfos) {
                FatalError("Error deserializing 'LSWriteAndNotifyInfo[]'");
                return MsgValueError;

            }
            auto& writeAndNotifyInfos = *maybe__writeAndNotifyInfos;
            // Sentinel = 'writeAndNotifyInfos'
            if ((!(((&(reader__)))->ReadSentinel(1295517623)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LSWriteAndNotifyInfo[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (this)->RecvAsyncCheckpointAndNotify(std::move(writeAndNotifyInfos));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_AsyncFinish__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_AsyncFinish", OTHER);

            mozilla::ipc::IPCResult __ok = (this)->RecvAsyncFinish();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_Loaded__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_Loaded", OTHER);

            mozilla::ipc::IPCResult __ok = (this)->RecvLoaded();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Reply___delete____ID:
        {
            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

auto PBackgroundLSSnapshotParent::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PBackgroundLSSnapshotParent::Result
{
    switch (msg__.type()) {
    case PBackgroundLSSnapshot::Msg_SyncCheckpoint__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_SyncCheckpoint", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__writeInfos = IPC::ReadParam<nsTArray<LSWriteInfo>>((&(reader__)));
            if (!maybe__writeInfos) {
                FatalError("Error deserializing 'LSWriteInfo[]'");
                return MsgValueError;

            }
            auto& writeInfos = *maybe__writeInfos;
            // Sentinel = 'writeInfos'
            if ((!(((&(reader__)))->ReadSentinel(388760619)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LSWriteInfo[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            mozilla::ipc::IPCResult __ok = (this)->RecvSyncCheckpoint(std::move(writeInfos));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PBackgroundLSSnapshot::Reply_SyncCheckpoint(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_SyncCheckpointAndNotify__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_SyncCheckpointAndNotify", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__writeAndNotifyInfos = IPC::ReadParam<nsTArray<LSWriteAndNotifyInfo>>((&(reader__)));
            if (!maybe__writeAndNotifyInfos) {
                FatalError("Error deserializing 'LSWriteAndNotifyInfo[]'");
                return MsgValueError;

            }
            auto& writeAndNotifyInfos = *maybe__writeAndNotifyInfos;
            // Sentinel = 'writeAndNotifyInfos'
            if ((!(((&(reader__)))->ReadSentinel(1295517623)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LSWriteAndNotifyInfo[]'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            mozilla::ipc::IPCResult __ok = (this)->RecvSyncCheckpointAndNotify(std::move(writeAndNotifyInfos));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PBackgroundLSSnapshot::Reply_SyncCheckpointAndNotify(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_SyncFinish__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_SyncFinish", OTHER);

            mozilla::ipc::ActorId id__ = Id();
            mozilla::ipc::IPCResult __ok = (this)->RecvSyncFinish();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PBackgroundLSSnapshot::Reply_SyncFinish(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_LoadValueAndMoreItems__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_LoadValueAndMoreItems", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__key = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__key) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& key = *maybe__key;
            // Sentinel = 'key'
            if ((!(((&(reader__)))->ReadSentinel(42402122)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            LSValue value{};
            nsTArray<LSItemInfo> itemInfos{};
            mozilla::ipc::IPCResult __ok = (this)->RecvLoadValueAndMoreItems(std::move(key), (&(value)), (&(itemInfos)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PBackgroundLSSnapshot::Reply_LoadValueAndMoreItems(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), value);
            // Sentinel = 'value'
            ((&(writer__)))->WriteSentinel(107610654);
            IPC::WriteParam((&(writer__)), itemInfos);
            // Sentinel = 'itemInfos'
            ((&(writer__)))->WriteSentinel(307430319);
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_LoadKeys__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_LoadKeys", OTHER);

            mozilla::ipc::ActorId id__ = Id();
            nsTArray<nsString> keys{};
            mozilla::ipc::IPCResult __ok = (this)->RecvLoadKeys((&(keys)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PBackgroundLSSnapshot::Reply_LoadKeys(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), keys);
            // Sentinel = 'keys'
            ((&(writer__)))->WriteSentinel(71565757);
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    case PBackgroundLSSnapshot::Msg_IncreasePeakUsage__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackgroundLSSnapshot::Msg_IncreasePeakUsage", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__minSize = IPC::ReadParam<int64_t>((&(reader__)));
            if (!maybe__minSize) {
                FatalError("Error deserializing 'int64_t'");
                return MsgValueError;

            }
            auto& minSize = *maybe__minSize;
            // Sentinel = 'minSize'
            if ((!(((&(reader__)))->ReadSentinel(192807648)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            int64_t size{};
            mozilla::ipc::IPCResult __ok = (this)->RecvIncreasePeakUsage(std::move(minSize), (&(size)));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            reply__ = PBackgroundLSSnapshot::Reply_IncreasePeakUsage(id__);
            IPC::MessageWriter writer__{
                    (*(reply__)),
                    this};

            IPC::WriteParam((&(writer__)), size);
            // Sentinel = 'size'
            ((&(writer__)))->WriteSentinel(73662908);
            if (mozilla::ipc::LoggingEnabledFor("PBackgroundLSSnapshot", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundLSSnapshotParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Sending reply ",
                    reply__->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}



} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PBackgroundLSSnapshotParent*>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
    // Sentinel = 'PBackgroundLSSnapshot'
    (aWriter)->WriteSentinel(1475283008);
}

auto ParamTraits<::mozilla::dom::PBackgroundLSSnapshotParent*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
    if (!maybe__actor) {
        aReader->FatalError("Error deserializing managed PBackgroundLSSnapshot actor");
        return {};

    }
    auto& actor = *maybe__actor;
    // Sentinel = 'PBackgroundLSSnapshot'
    if ((!((aReader)->ReadSentinel(1475283008)))) {
        mozilla::ipc::SentinelReadError("Error deserializing managed PBackgroundLSSnapshot actor");
        return {};
    }

    if (actor && actor->GetProtocolId() != PBackgroundLSSnapshotMsgStart) {
        aReader->FatalError("Unexpected actor type (expected PBackgroundLSSnapshot)");

        return {};
    }
    return static_cast<::mozilla::dom::PBackgroundLSSnapshotParent*>(actor);
}

} // namespace IPC
