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


#include "mozilla/net/PNeckoChild.h"
#include "SerializedLoadContext.h"
#include "mozilla/AntiTrackingIPCUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/FeaturePolicyUtils.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/NavigationAPIIPCUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/SessionHistoryEntry.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/net/CacheInfoIPCTypes.h"
#include "mozilla/net/ClassOfService.h"
#include "mozilla/net/NeckoChild.h"
#include "nsDOMNavigationTiming.h"
#include "nsDocShellLoadState.h"
#include "nsHttp.h"
#include "nsHttpResponseHead.h"
#include "nsIPrincipal.h"
#include "nsIPropertyBag2.h"

#include "mozilla/dom/PContentChild.h"
#include "mozilla/net/PHttpChannelChild.h"
#include "mozilla/net/PCookieServiceChild.h"
#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/net/PGIOChannelChild.h"
#include "mozilla/net/PWebSocketChild.h"
#include "mozilla/net/PWebSocketEventListenerChild.h"
#include "mozilla/net/PTCPSocketChild.h"
#include "mozilla/net/PTCPServerSocketChild.h"
#include "mozilla/net/PUDPSocketChild.h"
#include "mozilla/net/PDNSRequestChild.h"
#include "mozilla/net/PTransportProviderChild.h"
#include "mozilla/net/PStunAddrsRequestChild.h"
#include "mozilla/net/PWebrtcTCPSocketChild.h"
#include "mozilla/net/PSocketProcessBridgeChild.h"
#include "mozilla/net/PDocumentChannelChild.h"
#include "mozilla/net/PAltDataOutputStreamChild.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 net {


auto PNeckoChild::RecvPTransportProviderConstructor(PTransportProviderChild* actor) -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

auto PNeckoChild::RecvPTCPSocketConstructor(
        PTCPSocketChild* actor,
        const nsAString& host,
        const uint16_t& port) -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

MOZ_IMPLICIT PNeckoChild::PNeckoChild() :
    mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PNeckoChild);
}

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

auto PNeckoChild::ActorAlloc() -> void
{
    AddRef();
}

auto PNeckoChild::ActorDealloc() -> void
{
    Release();
}

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

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

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

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

auto PNeckoChild::ManagedPHttpChannelChild(nsTArray<PHttpChannelChild*>& aArr) const -> void
{
    mManagedPHttpChannelChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPHttpChannelChild() const -> const ManagedContainer<PHttpChannelChild>&
{
    return mManagedPHttpChannelChild;
}

auto PNeckoChild::ManagedPCookieServiceChild(nsTArray<PCookieServiceChild*>& aArr) const -> void
{
    mManagedPCookieServiceChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPCookieServiceChild() const -> const ManagedContainer<PCookieServiceChild>&
{
    return mManagedPCookieServiceChild;
}

auto PNeckoChild::ManagedPWebSocketChild(nsTArray<PWebSocketChild*>& aArr) const -> void
{
    mManagedPWebSocketChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPWebSocketChild() const -> const ManagedContainer<PWebSocketChild>&
{
    return mManagedPWebSocketChild;
}

auto PNeckoChild::ManagedPWebSocketEventListenerChild(nsTArray<PWebSocketEventListenerChild*>& aArr) const -> void
{
    mManagedPWebSocketEventListenerChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPWebSocketEventListenerChild() const -> const ManagedContainer<PWebSocketEventListenerChild>&
{
    return mManagedPWebSocketEventListenerChild;
}

auto PNeckoChild::ManagedPTCPSocketChild(nsTArray<PTCPSocketChild*>& aArr) const -> void
{
    mManagedPTCPSocketChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPTCPSocketChild() const -> const ManagedContainer<PTCPSocketChild>&
{
    return mManagedPTCPSocketChild;
}

auto PNeckoChild::ManagedPTCPServerSocketChild(nsTArray<PTCPServerSocketChild*>& aArr) const -> void
{
    mManagedPTCPServerSocketChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPTCPServerSocketChild() const -> const ManagedContainer<PTCPServerSocketChild>&
{
    return mManagedPTCPServerSocketChild;
}

auto PNeckoChild::ManagedPUDPSocketChild(nsTArray<PUDPSocketChild*>& aArr) const -> void
{
    mManagedPUDPSocketChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPUDPSocketChild() const -> const ManagedContainer<PUDPSocketChild>&
{
    return mManagedPUDPSocketChild;
}

auto PNeckoChild::ManagedPDNSRequestChild(nsTArray<PDNSRequestChild*>& aArr) const -> void
{
    mManagedPDNSRequestChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPDNSRequestChild() const -> const ManagedContainer<PDNSRequestChild>&
{
    return mManagedPDNSRequestChild;
}

auto PNeckoChild::ManagedPGIOChannelChild(nsTArray<PGIOChannelChild*>& aArr) const -> void
{
    mManagedPGIOChannelChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPGIOChannelChild() const -> const ManagedContainer<PGIOChannelChild>&
{
    return mManagedPGIOChannelChild;
}

auto PNeckoChild::ManagedPTransportProviderChild(nsTArray<PTransportProviderChild*>& aArr) const -> void
{
    mManagedPTransportProviderChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPTransportProviderChild() const -> const ManagedContainer<PTransportProviderChild>&
{
    return mManagedPTransportProviderChild;
}

auto PNeckoChild::ManagedPAltDataOutputStreamChild(nsTArray<PAltDataOutputStreamChild*>& aArr) const -> void
{
    mManagedPAltDataOutputStreamChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPAltDataOutputStreamChild() const -> const ManagedContainer<PAltDataOutputStreamChild>&
{
    return mManagedPAltDataOutputStreamChild;
}

auto PNeckoChild::ManagedPStunAddrsRequestChild(nsTArray<PStunAddrsRequestChild*>& aArr) const -> void
{
    mManagedPStunAddrsRequestChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPStunAddrsRequestChild() const -> const ManagedContainer<PStunAddrsRequestChild>&
{
    return mManagedPStunAddrsRequestChild;
}

auto PNeckoChild::ManagedPWebrtcTCPSocketChild(nsTArray<PWebrtcTCPSocketChild*>& aArr) const -> void
{
    mManagedPWebrtcTCPSocketChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPWebrtcTCPSocketChild() const -> const ManagedContainer<PWebrtcTCPSocketChild>&
{
    return mManagedPWebrtcTCPSocketChild;
}

auto PNeckoChild::ManagedPDocumentChannelChild(nsTArray<PDocumentChannelChild*>& aArr) const -> void
{
    mManagedPDocumentChannelChild.ToArray(aArr);
}

auto PNeckoChild::ManagedPDocumentChannelChild() const -> const ManagedContainer<PDocumentChannelChild>&
{
    return mManagedPDocumentChannelChild;
}

auto PNeckoChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    static constexpr ::mozilla::ipc::ProtocolId sIds[] = {
        PHttpChannelMsgStart,
        PCookieServiceMsgStart,
        PWebSocketMsgStart,
        PWebSocketEventListenerMsgStart,
        PTCPSocketMsgStart,
        PTCPServerSocketMsgStart,
        PUDPSocketMsgStart,
        PDNSRequestMsgStart,
        PGIOChannelMsgStart,
        PTransportProviderMsgStart,
        PAltDataOutputStreamMsgStart,
        PStunAddrsRequestMsgStart,
        PWebrtcTCPSocketMsgStart,
        PDocumentChannelMsgStart
    };
    return sIds;
}

auto PNeckoChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    case PHttpChannelMsgStart:
        return (&(mManagedPHttpChannelChild));
    case PCookieServiceMsgStart:
        return (&(mManagedPCookieServiceChild));
    case PWebSocketMsgStart:
        return (&(mManagedPWebSocketChild));
    case PWebSocketEventListenerMsgStart:
        return (&(mManagedPWebSocketEventListenerChild));
    case PTCPSocketMsgStart:
        return (&(mManagedPTCPSocketChild));
    case PTCPServerSocketMsgStart:
        return (&(mManagedPTCPServerSocketChild));
    case PUDPSocketMsgStart:
        return (&(mManagedPUDPSocketChild));
    case PDNSRequestMsgStart:
        return (&(mManagedPDNSRequestChild));
    case PGIOChannelMsgStart:
        return (&(mManagedPGIOChannelChild));
    case PTransportProviderMsgStart:
        return (&(mManagedPTransportProviderChild));
    case PAltDataOutputStreamMsgStart:
        return (&(mManagedPAltDataOutputStreamChild));
    case PStunAddrsRequestMsgStart:
        return (&(mManagedPStunAddrsRequestChild));
    case PWebrtcTCPSocketMsgStart:
        return (&(mManagedPWebrtcTCPSocketChild));
    case PDocumentChannelMsgStart:
        return (&(mManagedPDocumentChannelChild));
    default:
        return nullptr;
    }
}

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

auto PNeckoChild::OpenPHttpChannelEndpoint(PHttpChannelChild* aActor) -> ManagedEndpoint<PHttpChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PHttpChannelChild actor");
        return ManagedEndpoint<PHttpChannelParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PHttpChannelChild actor");
        return ManagedEndpoint<PHttpChannelParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PHttpChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPHttpChannelEndpoint(
        ManagedEndpoint<PHttpChannelChild> aEndpoint,
        PHttpChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPCookieServiceEndpoint(PCookieServiceChild* aActor) -> ManagedEndpoint<PCookieServiceParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PCookieServiceChild actor");
        return ManagedEndpoint<PCookieServiceParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PCookieServiceChild actor");
        return ManagedEndpoint<PCookieServiceParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PCookieServiceParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPCookieServiceEndpoint(
        ManagedEndpoint<PCookieServiceChild> aEndpoint,
        PCookieServiceChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPWebSocketEndpoint(PWebSocketChild* aActor) -> ManagedEndpoint<PWebSocketParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PWebSocketChild actor");
        return ManagedEndpoint<PWebSocketParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebSocketChild actor");
        return ManagedEndpoint<PWebSocketParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PWebSocketParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPWebSocketEndpoint(
        ManagedEndpoint<PWebSocketChild> aEndpoint,
        PWebSocketChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPWebSocketEventListenerEndpoint(PWebSocketEventListenerChild* aActor) -> ManagedEndpoint<PWebSocketEventListenerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PWebSocketEventListenerChild actor");
        return ManagedEndpoint<PWebSocketEventListenerParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebSocketEventListenerChild actor");
        return ManagedEndpoint<PWebSocketEventListenerParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PWebSocketEventListenerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPWebSocketEventListenerEndpoint(
        ManagedEndpoint<PWebSocketEventListenerChild> aEndpoint,
        PWebSocketEventListenerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPTCPSocketEndpoint(PTCPSocketChild* aActor) -> ManagedEndpoint<PTCPSocketParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PTCPSocketChild actor");
        return ManagedEndpoint<PTCPSocketParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PTCPSocketChild actor");
        return ManagedEndpoint<PTCPSocketParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PTCPSocketParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPTCPSocketEndpoint(
        ManagedEndpoint<PTCPSocketChild> aEndpoint,
        PTCPSocketChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPTCPServerSocketEndpoint(PTCPServerSocketChild* aActor) -> ManagedEndpoint<PTCPServerSocketParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PTCPServerSocketChild actor");
        return ManagedEndpoint<PTCPServerSocketParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PTCPServerSocketChild actor");
        return ManagedEndpoint<PTCPServerSocketParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PTCPServerSocketParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPTCPServerSocketEndpoint(
        ManagedEndpoint<PTCPServerSocketChild> aEndpoint,
        PTCPServerSocketChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPUDPSocketEndpoint(PUDPSocketChild* aActor) -> ManagedEndpoint<PUDPSocketParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PUDPSocketChild actor");
        return ManagedEndpoint<PUDPSocketParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PUDPSocketChild actor");
        return ManagedEndpoint<PUDPSocketParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PUDPSocketParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPUDPSocketEndpoint(
        ManagedEndpoint<PUDPSocketChild> aEndpoint,
        PUDPSocketChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPDNSRequestEndpoint(PDNSRequestChild* aActor) -> ManagedEndpoint<PDNSRequestParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PDNSRequestChild actor");
        return ManagedEndpoint<PDNSRequestParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PDNSRequestChild actor");
        return ManagedEndpoint<PDNSRequestParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PDNSRequestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPDNSRequestEndpoint(
        ManagedEndpoint<PDNSRequestChild> aEndpoint,
        PDNSRequestChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPGIOChannelEndpoint(PGIOChannelChild* aActor) -> ManagedEndpoint<PGIOChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PGIOChannelChild actor");
        return ManagedEndpoint<PGIOChannelParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PGIOChannelChild actor");
        return ManagedEndpoint<PGIOChannelParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PGIOChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPGIOChannelEndpoint(
        ManagedEndpoint<PGIOChannelChild> aEndpoint,
        PGIOChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPTransportProviderEndpoint(PTransportProviderChild* aActor) -> ManagedEndpoint<PTransportProviderParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PTransportProviderChild actor");
        return ManagedEndpoint<PTransportProviderParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PTransportProviderChild actor");
        return ManagedEndpoint<PTransportProviderParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PTransportProviderParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPTransportProviderEndpoint(
        ManagedEndpoint<PTransportProviderChild> aEndpoint,
        PTransportProviderChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPAltDataOutputStreamEndpoint(PAltDataOutputStreamChild* aActor) -> ManagedEndpoint<PAltDataOutputStreamParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PAltDataOutputStreamChild actor");
        return ManagedEndpoint<PAltDataOutputStreamParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PAltDataOutputStreamChild actor");
        return ManagedEndpoint<PAltDataOutputStreamParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PAltDataOutputStreamParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPAltDataOutputStreamEndpoint(
        ManagedEndpoint<PAltDataOutputStreamChild> aEndpoint,
        PAltDataOutputStreamChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPStunAddrsRequestEndpoint(PStunAddrsRequestChild* aActor) -> ManagedEndpoint<PStunAddrsRequestParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PStunAddrsRequestChild actor");
        return ManagedEndpoint<PStunAddrsRequestParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PStunAddrsRequestChild actor");
        return ManagedEndpoint<PStunAddrsRequestParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PStunAddrsRequestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPStunAddrsRequestEndpoint(
        ManagedEndpoint<PStunAddrsRequestChild> aEndpoint,
        PStunAddrsRequestChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPWebrtcTCPSocketEndpoint(PWebrtcTCPSocketChild* aActor) -> ManagedEndpoint<PWebrtcTCPSocketParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PWebrtcTCPSocketChild actor");
        return ManagedEndpoint<PWebrtcTCPSocketParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebrtcTCPSocketChild actor");
        return ManagedEndpoint<PWebrtcTCPSocketParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PWebrtcTCPSocketParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPWebrtcTCPSocketEndpoint(
        ManagedEndpoint<PWebrtcTCPSocketChild> aEndpoint,
        PWebrtcTCPSocketChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PNeckoChild::OpenPDocumentChannelEndpoint(PDocumentChannelChild* aActor) -> ManagedEndpoint<PDocumentChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PDocumentChannelChild actor");
        return ManagedEndpoint<PDocumentChannelParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PDocumentChannelChild actor");
        return ManagedEndpoint<PDocumentChannelParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PDocumentChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PNeckoChild::BindPDocumentChannelEndpoint(
        ManagedEndpoint<PDocumentChannelChild> aEndpoint,
        PDocumentChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

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


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

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

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

auto PNeckoChild::SendPCookieServiceConstructor() -> PCookieServiceChild*
{
    PCookieServiceChild* actor = (static_cast<NeckoChild*>(this))->AllocPCookieServiceChild();
    return SendPCookieServiceConstructor(std::move(actor));
}

auto PNeckoChild::SendPCookieServiceConstructor(PCookieServiceChild* actor) -> PCookieServiceChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PCookieServiceChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PCookieServiceChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PCookieServiceConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PCookieServiceConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PCookieServiceChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPHttpChannelConstructor(
        PHttpChannelChild* actor,
        PBrowserChild* browser,
        const SerializedLoadContext& loadContext,
        const HttpChannelCreationArgs& args) -> PHttpChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PHttpChannelChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PHttpChannelChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PHttpChannelConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), browser);
    // Sentinel = 'browser'
    ((&(writer__)))->WriteSentinel(201130757);
    IPC::WriteParam((&(writer__)), loadContext);
    // Sentinel = 'loadContext'
    ((&(writer__)))->WriteSentinel(444990598);
    IPC::WriteParam((&(writer__)), args);
    // Sentinel = 'args'
    ((&(writer__)))->WriteSentinel(69140910);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PHttpChannelConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PHttpChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPWebSocketConstructor(
        PBrowserChild* browser,
        const SerializedLoadContext& loadContext,
        const uint32_t& aSerialID) -> PWebSocketChild*
{
    PWebSocketChild* actor = (static_cast<NeckoChild*>(this))->AllocPWebSocketChild(browser, loadContext, aSerialID);
    return SendPWebSocketConstructor(std::move(actor), browser, std::move(loadContext), std::move(aSerialID));
}

auto PNeckoChild::SendPWebSocketConstructor(
        PWebSocketChild* actor,
        PBrowserChild* browser,
        const SerializedLoadContext& loadContext,
        const uint32_t& aSerialID) -> PWebSocketChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PWebSocketChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebSocketChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PWebSocketConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), browser);
    // Sentinel = 'browser'
    ((&(writer__)))->WriteSentinel(201130757);
    IPC::WriteParam((&(writer__)), loadContext);
    // Sentinel = 'loadContext'
    ((&(writer__)))->WriteSentinel(444990598);
    IPC::WriteParam((&(writer__)), aSerialID);
    // Sentinel = 'aSerialID'
    ((&(writer__)))->WriteSentinel(287572815);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PWebSocketConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PWebSocketChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPTCPServerSocketConstructor(
        const uint16_t& localPort,
        const uint16_t& backlog,
        const bool& useArrayBuffers) -> PTCPServerSocketChild*
{
    PTCPServerSocketChild* actor = (static_cast<NeckoChild*>(this))->AllocPTCPServerSocketChild(localPort, backlog, useArrayBuffers);
    return SendPTCPServerSocketConstructor(std::move(actor), std::move(localPort), std::move(backlog), std::move(useArrayBuffers));
}

auto PNeckoChild::SendPTCPServerSocketConstructor(
        PTCPServerSocketChild* actor,
        const uint16_t& localPort,
        const uint16_t& backlog,
        const bool& useArrayBuffers) -> PTCPServerSocketChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PTCPServerSocketChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PTCPServerSocketChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PTCPServerSocketConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), localPort);
    // Sentinel = 'localPort'
    ((&(writer__)))->WriteSentinel(306774961);
    IPC::WriteParam((&(writer__)), backlog);
    // Sentinel = 'backlog'
    ((&(writer__)))->WriteSentinel(186581716);
    IPC::WriteParam((&(writer__)), useArrayBuffers);
    // Sentinel = 'useArrayBuffers'
    ((&(writer__)))->WriteSentinel(815007258);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PTCPServerSocketConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PTCPServerSocketChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPUDPSocketConstructor(
        nsIPrincipal* principal,
        const nsACString& filter) -> PUDPSocketChild*
{
    PUDPSocketChild* actor = (static_cast<NeckoChild*>(this))->AllocPUDPSocketChild(principal, filter);
    return SendPUDPSocketConstructor(std::move(actor), principal, std::move(filter));
}

auto PNeckoChild::SendPUDPSocketConstructor(
        PUDPSocketChild* actor,
        nsIPrincipal* principal,
        const nsACString& filter) -> PUDPSocketChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PUDPSocketChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PUDPSocketChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PUDPSocketConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), principal);
    // Sentinel = 'principal'
    ((&(writer__)))->WriteSentinel(319620035);
    IPC::WriteParam((&(writer__)), filter);
    // Sentinel = 'filter'
    ((&(writer__)))->WriteSentinel(146735751);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PUDPSocketConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PUDPSocketChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPDNSRequestConstructor(
        PDNSRequestChild* actor,
        const nsACString& hostName,
        const nsACString& trrServer,
        const int32_t& port,
        const uint16_t& type,
        const OriginAttributes& originAttributes,
        const DNSFlags& flags) -> PDNSRequestChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PDNSRequestChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PDNSRequestChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PDNSRequestConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), hostName);
    // Sentinel = 'hostName'
    ((&(writer__)))->WriteSentinel(249627456);
    IPC::WriteParam((&(writer__)), trrServer);
    // Sentinel = 'trrServer'
    ((&(writer__)))->WriteSentinel(320603088);
    IPC::WriteParam((&(writer__)), port);
    // Sentinel = 'port'
    ((&(writer__)))->WriteSentinel(73990598);
    IPC::WriteParam((&(writer__)), type);
    // Sentinel = 'type'
    ((&(writer__)))->WriteSentinel(75760067);
    IPC::WriteParam((&(writer__)), originAttributes);
    // Sentinel = 'originAttributes'
    ((&(writer__)))->WriteSentinel(947259056);
    IPC::WriteParam((&(writer__)), flags);
    // Sentinel = 'flags'
    ((&(writer__)))->WriteSentinel(102171150);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PDNSRequestConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PDNSRequestChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPDocumentChannelConstructor(
        PDocumentChannelChild* actor,
        const MaybeDiscardedBrowsingContext& browsingContext,
        const DocumentChannelCreationArgs& args) -> PDocumentChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PDocumentChannelChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PDocumentChannelChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PDocumentChannelConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), browsingContext);
    // Sentinel = 'browsingContext'
    ((&(writer__)))->WriteSentinel(844695121);
    IPC::WriteParam((&(writer__)), args);
    // Sentinel = 'args'
    ((&(writer__)))->WriteSentinel(69140910);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PDocumentChannelConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PDocumentChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPWebSocketEventListenerConstructor(const uint64_t& aInnerWindowID) -> PWebSocketEventListenerChild*
{
    PWebSocketEventListenerChild* actor = (static_cast<NeckoChild*>(this))->AllocPWebSocketEventListenerChild(aInnerWindowID);
    return SendPWebSocketEventListenerConstructor(std::move(actor), std::move(aInnerWindowID));
}

auto PNeckoChild::SendPWebSocketEventListenerConstructor(
        PWebSocketEventListenerChild* actor,
        const uint64_t& aInnerWindowID) -> PWebSocketEventListenerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PWebSocketEventListenerChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebSocketEventListenerChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PWebSocketEventListenerConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), aInnerWindowID);
    // Sentinel = 'aInnerWindowID'
    ((&(writer__)))->WriteSentinel(687670627);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PWebSocketEventListenerConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PWebSocketEventListenerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPredPredict(
        nsIURI* targetURI,
        nsIURI* sourceURI,
        const uint32_t& reason,
        const OriginAttributes& originAttributes,
        const bool& hasVerifier) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PredPredict(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), targetURI);
    // Sentinel = 'targetURI'
    ((&(writer__)))->WriteSentinel(308413304);
    IPC::WriteParam((&(writer__)), sourceURI);
    // Sentinel = 'sourceURI'
    ((&(writer__)))->WriteSentinel(316277634);
    IPC::WriteParam((&(writer__)), reason);
    // Sentinel = 'reason'
    ((&(writer__)))->WriteSentinel(148112009);
    IPC::WriteParam((&(writer__)), originAttributes);
    // Sentinel = 'originAttributes'
    ((&(writer__)))->WriteSentinel(947259056);
    IPC::WriteParam((&(writer__)), hasVerifier);
    // Sentinel = 'hasVerifier'
    ((&(writer__)))->WriteSentinel(445842553);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PredPredict", OTHER);

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

auto PNeckoChild::SendPredLearn(
        nsIURI* targetURI,
        nsIURI* sourceURI,
        const uint32_t& reason,
        const OriginAttributes& originAttributes) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PredLearn(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), targetURI);
    // Sentinel = 'targetURI'
    ((&(writer__)))->WriteSentinel(308413304);
    IPC::WriteParam((&(writer__)), sourceURI);
    // Sentinel = 'sourceURI'
    ((&(writer__)))->WriteSentinel(316277634);
    IPC::WriteParam((&(writer__)), reason);
    // Sentinel = 'reason'
    ((&(writer__)))->WriteSentinel(148112009);
    IPC::WriteParam((&(writer__)), originAttributes);
    // Sentinel = 'originAttributes'
    ((&(writer__)))->WriteSentinel(947259056);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PredLearn", OTHER);

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

auto PNeckoChild::SendPredReset() -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PredReset(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PredReset", OTHER);

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

auto PNeckoChild::SendSpeculativeConnect(
        nsIURI* uri,
        nsIPrincipal* principal,
        const mozilla::Maybe<OriginAttributes>& originAttributes,
        const bool& anonymous) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_SpeculativeConnect(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), uri);
    // Sentinel = 'uri'
    ((&(writer__)))->WriteSentinel(45023569);
    IPC::WriteParam((&(writer__)), principal);
    // Sentinel = 'principal'
    ((&(writer__)))->WriteSentinel(319620035);
    IPC::WriteParam((&(writer__)), originAttributes);
    // Sentinel = 'originAttributes'
    ((&(writer__)))->WriteSentinel(947259056);
    IPC::WriteParam((&(writer__)), anonymous);
    // Sentinel = 'anonymous'
    ((&(writer__)))->WriteSentinel(322569194);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_SpeculativeConnect", OTHER);

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

auto PNeckoChild::SendHTMLDNSPrefetch(
        const nsAString& hostname,
        const bool& isHttps,
        const OriginAttributes& originAttributes,
        const DNSFlags& flags) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_HTMLDNSPrefetch(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), hostname);
    // Sentinel = 'hostname'
    ((&(writer__)))->WriteSentinel(258016096);
    IPC::WriteParam((&(writer__)), isHttps);
    // Sentinel = 'isHttps'
    ((&(writer__)))->WriteSentinel(192873200);
    IPC::WriteParam((&(writer__)), originAttributes);
    // Sentinel = 'originAttributes'
    ((&(writer__)))->WriteSentinel(947259056);
    IPC::WriteParam((&(writer__)), flags);
    // Sentinel = 'flags'
    ((&(writer__)))->WriteSentinel(102171150);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_HTMLDNSPrefetch", OTHER);

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

auto PNeckoChild::SendCancelHTMLDNSPrefetch(
        const nsAString& hostname,
        const bool& isHttps,
        const OriginAttributes& originAttributes,
        const DNSFlags& flags,
        const nsresult& reason) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_CancelHTMLDNSPrefetch(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), hostname);
    // Sentinel = 'hostname'
    ((&(writer__)))->WriteSentinel(258016096);
    IPC::WriteParam((&(writer__)), isHttps);
    // Sentinel = 'isHttps'
    ((&(writer__)))->WriteSentinel(192873200);
    IPC::WriteParam((&(writer__)), originAttributes);
    // Sentinel = 'originAttributes'
    ((&(writer__)))->WriteSentinel(947259056);
    IPC::WriteParam((&(writer__)), flags);
    // Sentinel = 'flags'
    ((&(writer__)))->WriteSentinel(102171150);
    IPC::WriteParam((&(writer__)), reason);
    // Sentinel = 'reason'
    ((&(writer__)))->WriteSentinel(148112009);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_CancelHTMLDNSPrefetch", OTHER);

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

auto PNeckoChild::SendConnectBaseChannel(const uint32_t& channelId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_ConnectBaseChannel(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), channelId);
    // Sentinel = 'channelId'
    ((&(writer__)))->WriteSentinel(301138823);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_ConnectBaseChannel", OTHER);

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

auto PNeckoChild::SendPGIOChannelConstructor(
        PBrowserChild* browser,
        const SerializedLoadContext& loadContext,
        const GIOChannelCreationArgs& args) -> PGIOChannelChild*
{
    PGIOChannelChild* actor = (static_cast<NeckoChild*>(this))->AllocPGIOChannelChild(browser, loadContext, args);
    return SendPGIOChannelConstructor(std::move(actor), browser, std::move(loadContext), std::move(args));
}

auto PNeckoChild::SendPGIOChannelConstructor(
        PGIOChannelChild* actor,
        PBrowserChild* browser,
        const SerializedLoadContext& loadContext,
        const GIOChannelCreationArgs& args) -> PGIOChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PGIOChannelChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PGIOChannelChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PGIOChannelConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), browser);
    // Sentinel = 'browser'
    ((&(writer__)))->WriteSentinel(201130757);
    IPC::WriteParam((&(writer__)), loadContext);
    // Sentinel = 'loadContext'
    ((&(writer__)))->WriteSentinel(444990598);
    IPC::WriteParam((&(writer__)), args);
    // Sentinel = 'args'
    ((&(writer__)))->WriteSentinel(69140910);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PGIOChannelConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PGIOChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendNotifyFileChannelOpened(const FileChannelInfo& info) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_NotifyFileChannelOpened(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), info);
    // Sentinel = 'info'
    ((&(writer__)))->WriteSentinel(70058413);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_NotifyFileChannelOpened", OTHER);

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

auto PNeckoChild::SendRequestContextLoadBegin(const uint64_t& rcid) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_RequestContextLoadBegin(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), rcid);
    // Sentinel = 'rcid'
    ((&(writer__)))->WriteSentinel(69927331);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_RequestContextLoadBegin", OTHER);

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

auto PNeckoChild::SendRequestContextAfterDOMContentLoaded(const uint64_t& rcid) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_RequestContextAfterDOMContentLoaded(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), rcid);
    // Sentinel = 'rcid'
    ((&(writer__)))->WriteSentinel(69927331);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_RequestContextAfterDOMContentLoaded", OTHER);

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

auto PNeckoChild::SendRemoveRequestContext(const uint64_t& rcid) -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_RemoveRequestContext(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), rcid);
    // Sentinel = 'rcid'
    ((&(writer__)))->WriteSentinel(69927331);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_RemoveRequestContext", OTHER);

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

auto PNeckoChild::SendPAltDataOutputStreamConstructor(
        const nsACString& type,
        const int64_t& predictedSize,
        mozilla::NotNull<PHttpChannelChild*> channel) -> PAltDataOutputStreamChild*
{
    PAltDataOutputStreamChild* actor = (static_cast<NeckoChild*>(this))->AllocPAltDataOutputStreamChild(type, predictedSize, channel);
    return SendPAltDataOutputStreamConstructor(std::move(actor), std::move(type), std::move(predictedSize), channel);
}

auto PNeckoChild::SendPAltDataOutputStreamConstructor(
        PAltDataOutputStreamChild* actor,
        const nsACString& type,
        const int64_t& predictedSize,
        mozilla::NotNull<PHttpChannelChild*> channel) -> PAltDataOutputStreamChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PAltDataOutputStreamChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PAltDataOutputStreamChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PAltDataOutputStreamConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), type);
    // Sentinel = 'type'
    ((&(writer__)))->WriteSentinel(75760067);
    IPC::WriteParam((&(writer__)), predictedSize);
    // Sentinel = 'predictedSize'
    ((&(writer__)))->WriteSentinel(628819280);
    IPC::WriteParam((&(writer__)), channel);
    // Sentinel = 'channel'
    ((&(writer__)))->WriteSentinel(189334234);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PAltDataOutputStreamConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PAltDataOutputStreamChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPStunAddrsRequestConstructor() -> PStunAddrsRequestChild*
{
    PStunAddrsRequestChild* actor = (static_cast<NeckoChild*>(this))->AllocPStunAddrsRequestChild();
    return SendPStunAddrsRequestConstructor(std::move(actor));
}

auto PNeckoChild::SendPStunAddrsRequestConstructor(PStunAddrsRequestChild* actor) -> PStunAddrsRequestChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PStunAddrsRequestChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PStunAddrsRequestChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PStunAddrsRequestConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PStunAddrsRequestConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PStunAddrsRequestChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendPWebrtcTCPSocketConstructor(const mozilla::Maybe<TabId>& tabId) -> PWebrtcTCPSocketChild*
{
    PWebrtcTCPSocketChild* actor = (static_cast<NeckoChild*>(this))->AllocPWebrtcTCPSocketChild(tabId);
    return SendPWebrtcTCPSocketConstructor(std::move(actor), std::move(tabId));
}

auto PNeckoChild::SendPWebrtcTCPSocketConstructor(
        PWebrtcTCPSocketChild* actor,
        const mozilla::Maybe<TabId>& tabId) -> PWebrtcTCPSocketChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PWebrtcTCPSocketChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebrtcTCPSocketChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PWebrtcTCPSocketConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), tabId);
    // Sentinel = 'tabId'
    ((&(writer__)))->WriteSentinel(99156453);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PWebrtcTCPSocketConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PWebrtcTCPSocketChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::SendGetExtensionStream(
        nsIURI* uri,
        mozilla::ipc::ResolveCallback<RefPtr<nsIInputStream>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_GetExtensionStream(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), uri);
    // Sentinel = 'uri'
    ((&(writer__)))->WriteSentinel(45023569);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionStream", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PNecko::Reply_GetExtensionStream__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__stream = IPC::ReadParam<RefPtr<nsIInputStream>>(aReader);
            if (!maybe__stream) {
                (aReader)->FatalError("Error deserializing 'nsIInputStream'");
                return MsgValueError;

            }
            auto& stream = *maybe__stream;
            // Sentinel = 'stream'
            if ((!((aReader)->ReadSentinel(153223821)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsIInputStream'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(stream));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PNeckoChild::SendGetExtensionStream(nsIURI* uri) -> RefPtr<GetExtensionStreamPromise>
{
    RefPtr<MozPromise<RefPtr<nsIInputStream>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<RefPtr<nsIInputStream>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetExtensionStream(std::move(uri), [promise__](RefPtr<nsIInputStream>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PNeckoChild::SendGetExtensionFD(
        nsIURI* uri,
        mozilla::ipc::ResolveCallback<FileDescriptor>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_GetExtensionFD(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), uri);
    // Sentinel = 'uri'
    ((&(writer__)))->WriteSentinel(45023569);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionFD", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PNecko::Reply_GetExtensionFD__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__fd = IPC::ReadParam<FileDescriptor>(aReader);
            if (!maybe__fd) {
                (aReader)->FatalError("Error deserializing 'FileDescriptor'");
                return MsgValueError;

            }
            auto& fd = *maybe__fd;
            // Sentinel = 'fd'
            if ((!((aReader)->ReadSentinel(20054219)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(fd));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PNeckoChild::SendGetExtensionFD(nsIURI* uri) -> RefPtr<GetExtensionFDPromise>
{
    RefPtr<MozPromise<FileDescriptor, ResponseRejectReason, true>::Private> promise__ = new MozPromise<FileDescriptor, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetExtensionFD(std::move(uri), [promise__](FileDescriptor&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PNeckoChild::SendInitSocketProcessBridge(
        mozilla::ipc::ResolveCallback<Endpoint<::mozilla::net::PSocketProcessBridgeChild>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_InitSocketProcessBridge(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_InitSocketProcessBridge", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PNecko::Reply_InitSocketProcessBridge__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__endpoint = IPC::ReadParam<Endpoint<::mozilla::net::PSocketProcessBridgeChild>>(aReader);
            if (!maybe__endpoint) {
                (aReader)->FatalError("Error deserializing 'Endpoint<::mozilla::net::PSocketProcessBridgeChild>'");
                return MsgValueError;

            }
            auto& endpoint = *maybe__endpoint;
            // Sentinel = 'endpoint'
            if ((!((aReader)->ReadSentinel(251724642)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::net::PSocketProcessBridgeChild>'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(endpoint));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PNeckoChild::SendInitSocketProcessBridge() -> RefPtr<InitSocketProcessBridgePromise>
{
    RefPtr<MozPromise<Endpoint<::mozilla::net::PSocketProcessBridgeChild>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<Endpoint<::mozilla::net::PSocketProcessBridgeChild>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendInitSocketProcessBridge([promise__](Endpoint<::mozilla::net::PSocketProcessBridgeChild>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PNeckoChild::SendResetSocketProcessBridge() -> bool
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_ResetSocketProcessBridge(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_ResetSocketProcessBridge", OTHER);

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

auto PNeckoChild::SendEnsureHSTSData(
        mozilla::ipc::ResolveCallback<bool>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_EnsureHSTSData(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_EnsureHSTSData", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PNecko::Reply_EnsureHSTSData__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__result = IPC::ReadParam<bool>(aReader);
            if (!maybe__result) {
                (aReader)->FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& result = *maybe__result;
            // Sentinel = 'result'
            if ((!((aReader)->ReadSentinel(153223840)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(result));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PNeckoChild::SendEnsureHSTSData() -> RefPtr<EnsureHSTSDataPromise>
{
    RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendEnsureHSTSData([promise__](bool&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PNeckoChild::SendGetPageThumbStream(
        nsIURI* uri,
        const LoadInfoArgs& loadInfo,
        mozilla::ipc::ResolveCallback<mozilla::Maybe<RemoteStreamInfo>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_GetPageThumbStream(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), uri);
    // Sentinel = 'uri'
    ((&(writer__)))->WriteSentinel(45023569);
    IPC::WriteParam((&(writer__)), loadInfo);
    // Sentinel = 'loadInfo'
    ((&(writer__)))->WriteSentinel(240386861);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_GetPageThumbStream", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PNecko::Reply_GetPageThumbStream__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__info = IPC::ReadParam<mozilla::Maybe<RemoteStreamInfo>>(aReader);
            if (!maybe__info) {
                (aReader)->FatalError("Error deserializing 'RemoteStreamInfo?'");
                return MsgValueError;

            }
            auto& info = *maybe__info;
            // Sentinel = 'info'
            if ((!((aReader)->ReadSentinel(70058413)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'RemoteStreamInfo?'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(info));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PNeckoChild::SendGetPageThumbStream(
        nsIURI* uri,
        const LoadInfoArgs& loadInfo) -> RefPtr<GetPageThumbStreamPromise>
{
    RefPtr<MozPromise<mozilla::Maybe<RemoteStreamInfo>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RemoteStreamInfo>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetPageThumbStream(std::move(uri), std::move(loadInfo), [promise__](mozilla::Maybe<RemoteStreamInfo>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PNeckoChild::SendGetPageIconStream(
        nsIURI* uri,
        const LoadInfoArgs& loadInfo,
        mozilla::ipc::ResolveCallback<mozilla::Maybe<RemoteStreamInfo>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_GetPageIconStream(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), uri);
    // Sentinel = 'uri'
    ((&(writer__)))->WriteSentinel(45023569);
    IPC::WriteParam((&(writer__)), loadInfo);
    // Sentinel = 'loadInfo'
    ((&(writer__)))->WriteSentinel(240386861);


    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_GetPageIconStream", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PNecko::Reply_GetPageIconStream__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__info = IPC::ReadParam<mozilla::Maybe<RemoteStreamInfo>>(aReader);
            if (!maybe__info) {
                (aReader)->FatalError("Error deserializing 'RemoteStreamInfo?'");
                return MsgValueError;

            }
            auto& info = *maybe__info;
            // Sentinel = 'info'
            if ((!((aReader)->ReadSentinel(70058413)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'RemoteStreamInfo?'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(info));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PNeckoChild::SendGetPageIconStream(
        nsIURI* uri,
        const LoadInfoArgs& loadInfo) -> RefPtr<GetPageIconStreamPromise>
{
    RefPtr<MozPromise<mozilla::Maybe<RemoteStreamInfo>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<RemoteStreamInfo>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetPageIconStream(std::move(uri), std::move(loadInfo), [promise__](mozilla::Maybe<RemoteStreamInfo>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PNeckoChild::SendPTCPSocketConstructor(
        const nsAString& host,
        const uint16_t& port) -> PTCPSocketChild*
{
    PTCPSocketChild* actor = (static_cast<NeckoChild*>(this))->AllocPTCPSocketChild(host, port);
    return SendPTCPSocketConstructor(std::move(actor), std::move(host), std::move(port));
}

auto PNeckoChild::SendPTCPSocketConstructor(
        PTCPSocketChild* actor,
        const nsAString& host,
        const uint16_t& port) -> PTCPSocketChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PTCPSocketChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PTCPSocketChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PNecko::Msg_PTCPSocketConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), host);
    // Sentinel = 'host'
    ((&(writer__)))->WriteSentinel(72024511);
    IPC::WriteParam((&(writer__)), port);
    // Sentinel = 'port'
    ((&(writer__)))->WriteSentinel(73990598);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PNeckoChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PNecko::Msg_PTCPSocketConstructor", OTHER);

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


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PTCPSocketChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PNeckoChild::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    switch (aProtocolId) {
    case PCookieServiceMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPCookieServiceChild(static_cast<PCookieServiceChild*>(aListener));
        return;
    case PWebSocketMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPWebSocketChild(static_cast<PWebSocketChild*>(aListener));
        return;
    case PWebSocketEventListenerMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPWebSocketEventListenerChild(static_cast<PWebSocketEventListenerChild*>(aListener));
        return;
    case PTCPSocketMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPTCPSocketChild(static_cast<PTCPSocketChild*>(aListener));
        return;
    case PTCPServerSocketMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPTCPServerSocketChild(static_cast<PTCPServerSocketChild*>(aListener));
        return;
    case PUDPSocketMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPUDPSocketChild(static_cast<PUDPSocketChild*>(aListener));
        return;
    case PGIOChannelMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPGIOChannelChild(static_cast<PGIOChannelChild*>(aListener));
        return;
    case PTransportProviderMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPTransportProviderChild(static_cast<PTransportProviderChild*>(aListener));
        return;
    case PAltDataOutputStreamMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPAltDataOutputStreamChild(static_cast<PAltDataOutputStreamChild*>(aListener));
        return;
    case PStunAddrsRequestMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPStunAddrsRequestChild(static_cast<PStunAddrsRequestChild*>(aListener));
        return;
    case PWebrtcTCPSocketMsgStart:
        static_cast<NeckoChild*>(this)->DeallocPWebrtcTCPSocketChild(static_cast<PWebrtcTCPSocketChild*>(aListener));
        return;
    default:
        FatalError("unreached");
        return;
    }
}

auto PNeckoChild::OnMessageReceived(const Message& msg__) -> PNeckoChild::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 PNecko::Reply___delete____ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PCookieServiceConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PHttpChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PWebSocketConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PTCPServerSocketConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PUDPSocketConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PDNSRequestConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PDocumentChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PWebSocketEventListenerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PGIOChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PAltDataOutputStreamConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PStunAddrsRequestConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_PWebrtcTCPSocketConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Reply_GetExtensionStream__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionStream", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PNecko::Reply_GetExtensionFD__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PNecko::Msg_GetExtensionFD", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PNecko::Reply_InitSocketProcessBridge__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PNecko::Msg_InitSocketProcessBridge", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PNecko::Reply_EnsureHSTSData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PNecko::Msg_EnsureHSTSData", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PNecko::Reply_GetPageThumbStream__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PNecko::Msg_GetPageThumbStream", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PNecko::Reply_GetPageIconStream__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PNecko::Msg_GetPageIconStream", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PNecko::Msg_PredOnPredictPrefetch__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_PredOnPredictPrefetch", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& uri = *maybe__uri;
            // Sentinel = 'uri'
            if ((!(((&(reader__)))->ReadSentinel(45023569)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsIURI'");
                return MsgValueError;
            }
            auto maybe__httpStatus = IPC::ReadParam<uint32_t>((&(reader__)));
            if (!maybe__httpStatus) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& httpStatus = *maybe__httpStatus;
            // Sentinel = 'httpStatus'
            if ((!(((&(reader__)))->ReadSentinel(391185477)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvPredOnPredictPrefetch(uri, std::move(httpStatus));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PNecko::Msg_PredOnPredictPreconnect__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_PredOnPredictPreconnect", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& uri = *maybe__uri;
            // Sentinel = 'uri'
            if ((!(((&(reader__)))->ReadSentinel(45023569)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsIURI'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvPredOnPredictPreconnect(uri);
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PNecko::Msg_PredOnPredictDNS__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_PredOnPredictDNS", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& uri = *maybe__uri;
            // Sentinel = 'uri'
            if ((!(((&(reader__)))->ReadSentinel(45023569)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsIURI'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvPredOnPredictDNS(uri);
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PNecko::Msg_SpeculativeConnectRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_SpeculativeConnectRequest", OTHER);

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

            return MsgProcessed;
        }
    case PNecko::Msg_NetworkChangeNotification__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_NetworkChangeNotification", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& type = *maybe__type;
            // Sentinel = 'type'
            if ((!(((&(reader__)))->ReadSentinel(75760067)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvNetworkChangeNotification(std::move(type));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PNecko::Msg_PTransportProviderConstructor__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_PTransportProviderConstructor", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__actorid__ = IPC::ReadParam<mozilla::ipc::ActorId>((&(reader__)));
            if (!maybe__actorid__) {
                FatalError("Error deserializing 'mozilla::ipc::ActorId'");
                return MsgValueError;

            }
            auto& actorid__ = *maybe__actorid__;
            // Sentinel = 'actorid'
            if ((!(((&(reader__)))->ReadSentinel(193725159)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'mozilla::ipc::ActorId'");
                return MsgValueError;
            }
            reader__.EndRead();
            PTransportProviderChild* actor = (static_cast<NeckoChild*>(this))->AllocPTransportProviderChild();
            if (!actor) {
                NS_WARNING("Cannot bind null PTransportProviderChild actor");
                return MsgValueError;
            }

            if (!actor->SetManagerAndRegister(this, actorid__)) {
                NS_WARNING("Failed to bind PTransportProviderChild actor");
                return MsgValueError;
            }

            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvPTransportProviderConstructor(std::move(actor));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PNecko::Msg_SetTRRDomain__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_SetTRRDomain", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

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

            }
            auto& domain = *maybe__domain;
            // Sentinel = 'domain'
            if ((!(((&(reader__)))->ReadSentinel(144704121)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvSetTRRDomain(std::move(domain));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PNecko::Reply_PTCPSocketConstructor__ID:
        {
            return MsgProcessed;
        }
    case PNecko::Msg_PTCPSocketConstructor__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PNecko", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PNeckoChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PNecko::Msg_PTCPSocketConstructor", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__actorid__ = IPC::ReadParam<mozilla::ipc::ActorId>((&(reader__)));
            if (!maybe__actorid__) {
                FatalError("Error deserializing 'mozilla::ipc::ActorId'");
                return MsgValueError;

            }
            auto& actorid__ = *maybe__actorid__;
            // Sentinel = 'actorid'
            if ((!(((&(reader__)))->ReadSentinel(193725159)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'mozilla::ipc::ActorId'");
                return MsgValueError;
            }
            auto maybe__host = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__host) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& host = *maybe__host;
            // Sentinel = 'host'
            if ((!(((&(reader__)))->ReadSentinel(72024511)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            auto maybe__port = IPC::ReadParam<uint16_t>((&(reader__)));
            if (!maybe__port) {
                FatalError("Error deserializing 'uint16_t'");
                return MsgValueError;

            }
            auto& port = *maybe__port;
            // Sentinel = 'port'
            if ((!(((&(reader__)))->ReadSentinel(73990598)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint16_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            PTCPSocketChild* actor = (static_cast<NeckoChild*>(this))->AllocPTCPSocketChild(host, port);
            if (!actor) {
                NS_WARNING("Cannot bind null PTCPSocketChild actor");
                return MsgValueError;
            }

            if (!actor->SetManagerAndRegister(this, actorid__)) {
                NS_WARNING("Failed to bind PTCPSocketChild actor");
                return MsgValueError;
            }

            mozilla::ipc::IPCResult __ok = (static_cast<NeckoChild*>(this))->RecvPTCPSocketConstructor(std::move(actor), std::move(host), std::move(port));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

auto PNeckoChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PNeckoChild::Result
{
    return MsgNotKnown;
}



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

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

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

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

        return {};
    }
    return static_cast<::mozilla::net::PNeckoChild*>(actor);
}

} // namespace IPC
