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


#include "mozilla/dom/PCookieStoreParent.h"
#include "ipc/IPCMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/CookieStoreParent.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/URIUtils.h"
#include "nsID.h"

#include "mozilla/ipc/PBackgroundParent.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 PCookieStoreParent::PCookieStoreParent() :
    mozilla::ipc::IProtocol(kProtocolId, mozilla::ipc::ParentSide)
{
    MOZ_COUNT_CTOR(PCookieStoreParent);
}

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

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

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

auto PCookieStoreParent::OtherPid() const -> ::base::ProcessId
{
    ::base::ProcessId pid =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
    MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
    return pid;
}

auto PCookieStoreParent::OtherChildID() const -> ::GeckoChildID
{
    ::GeckoChildID childID =
        ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
    MOZ_RELEASE_ASSERT(childID != -1);
    return childID;
}

auto PCookieStoreParent::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
    return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}

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

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

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

auto PCookieStoreParent::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
    mAsyncCallbacks.RejectPendingResponses(aReason);
}

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


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

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

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

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

auto PCookieStoreParent::OnMessageReceived(const Message& msg__) -> PCookieStoreParent::Result
{
    if (!CanSend()) {
        if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
            mozilla::ipc::LogMessageForProtocol(
                "PCookieStoreParent",
                this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                "Ignored message for dead actor",
                (&(msg__))->type(),
                mozilla::ipc::MessageDirection::eSending);
        }
        return MsgProcessed;

    }
    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 PCookieStore::Msg_GetRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PCookieStoreParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PCookieStore::Msg_GetRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__cookieURI = IPC::ReadParam<mozilla::NotNull<RefPtr<nsIURI>>>((&(reader__)));
            if (!maybe__cookieURI) {
                FatalError("Error deserializing 'NotNull<nsIURI>'");
                return MsgValueError;

            }
            auto& cookieURI = *maybe__cookieURI;
            // Sentinel = 'cookieURI'
            if ((!(((&(reader__)))->ReadSentinel(303301483)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'NotNull<nsIURI>'");
                return MsgValueError;
            }
            auto maybe__attrs = IPC::ReadParam<OriginAttributes>((&(reader__)));
            if (!maybe__attrs) {
                FatalError("Error deserializing 'OriginAttributes'");
                return MsgValueError;

            }
            auto& attrs = *maybe__attrs;
            // Sentinel = 'attrs'
            if ((!(((&(reader__)))->ReadSentinel(107807279)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributes'");
                return MsgValueError;
            }
            auto maybe__partitionedAttrs = IPC::ReadParam<mozilla::Maybe<OriginAttributes>>((&(reader__)));
            if (!maybe__partitionedAttrs) {
                FatalError("Error deserializing 'OriginAttributes?'");
                return MsgValueError;

            }
            auto& partitionedAttrs = *maybe__partitionedAttrs;
            // Sentinel = 'partitionedAttrs'
            if ((!(((&(reader__)))->ReadSentinel(958072498)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributes?'");
                return MsgValueError;
            }
            auto maybe__thirdPartyContext = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__thirdPartyContext) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& thirdPartyContext = *maybe__thirdPartyContext;
            // Sentinel = 'thirdPartyContext'
            if ((!(((&(reader__)))->ReadSentinel(1055852305)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__partitionForeign = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__partitionForeign) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& partitionForeign = *maybe__partitionForeign;
            // Sentinel = 'partitionForeign'
            if ((!(((&(reader__)))->ReadSentinel(956368549)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__usingStorageAccess = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__usingStorageAccess) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& usingStorageAccess = *maybe__usingStorageAccess;
            // Sentinel = 'usingStorageAccess'
            if ((!(((&(reader__)))->ReadSentinel(1180698446)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__isOn3PCBExceptionList = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__isOn3PCBExceptionList) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& isOn3PCBExceptionList = *maybe__isOn3PCBExceptionList;
            // Sentinel = 'isOn3PCBExceptionList'
            if ((!(((&(reader__)))->ReadSentinel(1400571885)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__matchName = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__matchName) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& matchName = *maybe__matchName;
            // Sentinel = 'matchName'
            if ((!(((&(reader__)))->ReadSentinel(302384015)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__name = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__name) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& name = *maybe__name;
            // Sentinel = 'name'
            if ((!(((&(reader__)))->ReadSentinel(69075362)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__path = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__path) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& path = *maybe__path;
            // Sentinel = 'path'
            if ((!(((&(reader__)))->ReadSentinel(70713774)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            auto maybe__onlyFirstMatch = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__onlyFirstMatch) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& onlyFirstMatch = *maybe__onlyFirstMatch;
            // Sentinel = 'onlyFirstMatch'
            if ((!(((&(reader__)))->ReadSentinel(727844280)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PCookieStore::Reply_GetRequest(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            GetRequestResolver resolver = [resolver__ = std::move(resolver__)](mozilla::Span<CookieStoreGetItem const> aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'data'
                    ((&(writer__)))->WriteSentinel(67109275);

                    if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PCookieStoreParent",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::CookieStoreParent*>(this))->RecvGetRequest(cookieURI, std::move(attrs), std::move(partitionedAttrs), std::move(thirdPartyContext), std::move(partitionForeign), std::move(usingStorageAccess), std::move(isOn3PCBExceptionList), std::move(matchName), std::move(name), std::move(path), std::move(onlyFirstMatch), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PCookieStore::Msg_SetRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PCookieStoreParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PCookieStore::Msg_SetRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__cookieURI = IPC::ReadParam<mozilla::NotNull<RefPtr<nsIURI>>>((&(reader__)));
            if (!maybe__cookieURI) {
                FatalError("Error deserializing 'NotNull<nsIURI>'");
                return MsgValueError;

            }
            auto& cookieURI = *maybe__cookieURI;
            // Sentinel = 'cookieURI'
            if ((!(((&(reader__)))->ReadSentinel(303301483)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'NotNull<nsIURI>'");
                return MsgValueError;
            }
            auto maybe__attrs = IPC::ReadParam<OriginAttributes>((&(reader__)));
            if (!maybe__attrs) {
                FatalError("Error deserializing 'OriginAttributes'");
                return MsgValueError;

            }
            auto& attrs = *maybe__attrs;
            // Sentinel = 'attrs'
            if ((!(((&(reader__)))->ReadSentinel(107807279)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributes'");
                return MsgValueError;
            }
            auto maybe__thirdPartyContext = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__thirdPartyContext) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& thirdPartyContext = *maybe__thirdPartyContext;
            // Sentinel = 'thirdPartyContext'
            if ((!(((&(reader__)))->ReadSentinel(1055852305)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__partitionForeign = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__partitionForeign) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& partitionForeign = *maybe__partitionForeign;
            // Sentinel = 'partitionForeign'
            if ((!(((&(reader__)))->ReadSentinel(956368549)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__usingStorageAccess = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__usingStorageAccess) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& usingStorageAccess = *maybe__usingStorageAccess;
            // Sentinel = 'usingStorageAccess'
            if ((!(((&(reader__)))->ReadSentinel(1180698446)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__isOn3PCBExceptionList = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__isOn3PCBExceptionList) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& isOn3PCBExceptionList = *maybe__isOn3PCBExceptionList;
            // Sentinel = 'isOn3PCBExceptionList'
            if ((!(((&(reader__)))->ReadSentinel(1400571885)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__name = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__name) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& name = *maybe__name;
            // Sentinel = 'name'
            if ((!(((&(reader__)))->ReadSentinel(69075362)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__value = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__value) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& value = *maybe__value;
            // Sentinel = 'value'
            if ((!(((&(reader__)))->ReadSentinel(107610654)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__session = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__session) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& session = *maybe__session;
            // Sentinel = 'session'
            if ((!(((&(reader__)))->ReadSentinel(203162373)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__expires = IPC::ReadParam<int64_t>((&(reader__)));
            if (!maybe__expires) {
                FatalError("Error deserializing 'int64_t'");
                return MsgValueError;

            }
            auto& expires = *maybe__expires;
            // Sentinel = 'expires'
            if ((!(((&(reader__)))->ReadSentinel(201392897)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'");
                return MsgValueError;
            }
            auto maybe__domain = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__domain) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& domain = *maybe__domain;
            // Sentinel = 'domain'
            if ((!(((&(reader__)))->ReadSentinel(144704121)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__path = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__path) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& path = *maybe__path;
            // Sentinel = 'path'
            if ((!(((&(reader__)))->ReadSentinel(70713774)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__sameSite = IPC::ReadParam<int32_t>((&(reader__)));
            if (!maybe__sameSite) {
                FatalError("Error deserializing 'int32_t'");
                return MsgValueError;

            }
            auto& sameSite = *maybe__sameSite;
            // Sentinel = 'sameSite'
            if ((!(((&(reader__)))->ReadSentinel(245498684)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'int32_t'");
                return MsgValueError;
            }
            auto maybe__partitioned = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__partitioned) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& partitioned = *maybe__partitioned;
            // Sentinel = 'partitioned'
            if ((!(((&(reader__)))->ReadSentinel(471794852)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__operationId = IPC::ReadParam<nsID>((&(reader__)));
            if (!maybe__operationId) {
                FatalError("Error deserializing 'nsID'");
                return MsgValueError;

            }
            auto& operationId = *maybe__operationId;
            // Sentinel = 'operationId'
            if ((!(((&(reader__)))->ReadSentinel(464847999)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsID'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PCookieStore::Reply_SetRequest(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            SetRequestResolver resolver = [resolver__ = std::move(resolver__)](const CookieStoreResult& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'result'
                    ((&(writer__)))->WriteSentinel(153223840);

                    if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PCookieStoreParent",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::CookieStoreParent*>(this))->RecvSetRequest(cookieURI, std::move(attrs), std::move(thirdPartyContext), std::move(partitionForeign), std::move(usingStorageAccess), std::move(isOn3PCBExceptionList), std::move(name), std::move(value), std::move(session), std::move(expires), std::move(domain), std::move(path), std::move(sameSite), std::move(partitioned), std::move(operationId), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PCookieStore::Msg_DeleteRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PCookieStoreParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PCookieStore::Msg_DeleteRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__cookieURI = IPC::ReadParam<mozilla::NotNull<RefPtr<nsIURI>>>((&(reader__)));
            if (!maybe__cookieURI) {
                FatalError("Error deserializing 'NotNull<nsIURI>'");
                return MsgValueError;

            }
            auto& cookieURI = *maybe__cookieURI;
            // Sentinel = 'cookieURI'
            if ((!(((&(reader__)))->ReadSentinel(303301483)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'NotNull<nsIURI>'");
                return MsgValueError;
            }
            auto maybe__attrs = IPC::ReadParam<OriginAttributes>((&(reader__)));
            if (!maybe__attrs) {
                FatalError("Error deserializing 'OriginAttributes'");
                return MsgValueError;

            }
            auto& attrs = *maybe__attrs;
            // Sentinel = 'attrs'
            if ((!(((&(reader__)))->ReadSentinel(107807279)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'OriginAttributes'");
                return MsgValueError;
            }
            auto maybe__thirdPartyContext = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__thirdPartyContext) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& thirdPartyContext = *maybe__thirdPartyContext;
            // Sentinel = 'thirdPartyContext'
            if ((!(((&(reader__)))->ReadSentinel(1055852305)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__partitionForeign = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__partitionForeign) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& partitionForeign = *maybe__partitionForeign;
            // Sentinel = 'partitionForeign'
            if ((!(((&(reader__)))->ReadSentinel(956368549)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__usingStorageAccess = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__usingStorageAccess) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& usingStorageAccess = *maybe__usingStorageAccess;
            // Sentinel = 'usingStorageAccess'
            if ((!(((&(reader__)))->ReadSentinel(1180698446)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__isOn3PCBExceptionList = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__isOn3PCBExceptionList) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& isOn3PCBExceptionList = *maybe__isOn3PCBExceptionList;
            // Sentinel = 'isOn3PCBExceptionList'
            if ((!(((&(reader__)))->ReadSentinel(1400571885)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__name = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__name) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& name = *maybe__name;
            // Sentinel = 'name'
            if ((!(((&(reader__)))->ReadSentinel(69075362)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__domain = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__domain) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& domain = *maybe__domain;
            // Sentinel = 'domain'
            if ((!(((&(reader__)))->ReadSentinel(144704121)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__path = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__path) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& path = *maybe__path;
            // Sentinel = 'path'
            if ((!(((&(reader__)))->ReadSentinel(70713774)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__partitioned = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__partitioned) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& partitioned = *maybe__partitioned;
            // Sentinel = 'partitioned'
            if ((!(((&(reader__)))->ReadSentinel(471794852)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            auto maybe__operationID = IPC::ReadParam<nsID>((&(reader__)));
            if (!maybe__operationID) {
                FatalError("Error deserializing 'nsID'");
                return MsgValueError;

            }
            auto& operationID = *maybe__operationID;
            // Sentinel = 'operationID'
            if ((!(((&(reader__)))->ReadSentinel(462750815)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsID'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PCookieStore::Reply_DeleteRequest(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            DeleteRequestResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'waitForNotification'
                    ((&(writer__)))->WriteSentinel(1294731204);

                    if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PCookieStoreParent",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::CookieStoreParent*>(this))->RecvDeleteRequest(cookieURI, std::move(attrs), std::move(thirdPartyContext), std::move(partitionForeign), std::move(usingStorageAccess), std::move(isOn3PCBExceptionList), std::move(name), std::move(domain), std::move(path), std::move(partitioned), std::move(operationID), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PCookieStore::Msg_GetSubscriptionsRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PCookieStoreParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PCookieStore::Msg_GetSubscriptionsRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& principalInfo = *maybe__principalInfo;
            // Sentinel = 'principalInfo'
            if ((!(((&(reader__)))->ReadSentinel(633472335)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'");
                return MsgValueError;
            }
            auto maybe__scopeURL = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__scopeURL) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& scopeURL = *maybe__scopeURL;
            // Sentinel = 'scopeURL'
            if ((!(((&(reader__)))->ReadSentinel(245498638)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PCookieStore::Reply_GetSubscriptionsRequest(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            GetSubscriptionsRequestResolver resolver = [resolver__ = std::move(resolver__)](mozilla::Span<CookieSubscription const> aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'subscriptions'
                    ((&(writer__)))->WriteSentinel(656541081);

                    if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PCookieStoreParent",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::CookieStoreParent*>(this))->RecvGetSubscriptionsRequest(std::move(principalInfo), std::move(scopeURL), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PCookieStore::Msg_SubscribeOrUnsubscribeRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PCookieStoreParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PCookieStore::Msg_SubscribeOrUnsubscribeRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& principalInfo = *maybe__principalInfo;
            // Sentinel = 'principalInfo'
            if ((!(((&(reader__)))->ReadSentinel(633472335)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'PrincipalInfo'");
                return MsgValueError;
            }
            auto maybe__scopeURL = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__scopeURL) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& scopeURL = *maybe__scopeURL;
            // Sentinel = 'scopeURL'
            if ((!(((&(reader__)))->ReadSentinel(245498638)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            auto maybe__subscriptions = IPC::ReadParam<nsTArray<CookieSubscription>>((&(reader__)));
            if (!maybe__subscriptions) {
                FatalError("Error deserializing 'CookieSubscription[]'");
                return MsgValueError;

            }
            auto& subscriptions = *maybe__subscriptions;
            // Sentinel = 'subscriptions'
            if ((!(((&(reader__)))->ReadSentinel(656541081)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'CookieSubscription[]'");
                return MsgValueError;
            }
            auto maybe__subscribe = IPC::ReadParam<bool>((&(reader__)));
            if (!maybe__subscribe) {
                FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& subscribe = *maybe__subscribe;
            // Sentinel = 'subscribe'
            if ((!(((&(reader__)))->ReadSentinel(322372547)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PCookieStore::Reply_SubscribeOrUnsubscribeRequest(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            SubscribeOrUnsubscribeRequestResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'result'
                    ((&(writer__)))->WriteSentinel(153223840);

                    if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PCookieStoreParent",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::CookieStoreParent*>(this))->RecvSubscribeOrUnsubscribeRequest(std::move(principalInfo), std::move(scopeURL), std::move(subscriptions), std::move(subscribe), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PCookieStore::Msg_Close__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PCookieStore", mozilla::ipc::ParentSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PCookieStoreParent",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PCookieStore::Msg_Close", OTHER);

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

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

auto PCookieStoreParent::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PCookieStoreParent::Result
{
    if (!CanSend()) {
        return MsgDropped;

    }
    return MsgNotKnown;
}



} // namespace dom
} // namespace mozilla
