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


#include "mozilla/ipc/PBackgroundChild.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/RemoteLazyInputStream.h"
#include "mozilla/URLClassifierIPCUtils.h"
#include "mozilla/dom/BindingIPCUtils.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/NavigationAPIIPCUtils.h"
#include "mozilla/dom/PBackgroundSessionStorageCache.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/PolicyContainerMessageUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/dom/SessionHistoryEntry.h"
#include "mozilla/dom/TabMessageUtils.h"
#include "mozilla/dom/WorkerIPCUtils.h"
#include "mozilla/dom/cache/IPCUtils.h"
#include "mozilla/dom/indexedDB/Key.h"
#include "mozilla/dom/indexedDB/KeyPath.h"
#include "mozilla/dom/indexedDB/SerializationHelpers.h"
#include "mozilla/dom/localstorage/SerializationHelpers.h"
#include "mozilla/dom/notification/IPCUtils.h"
#include "mozilla/dom/quota/SerializationHelpers.h"
#include "mozilla/ipc/BigBuffer.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/SerializedStructuredCloneBuffer.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "nsID.h"
#include "nsIPolicyContainer.h"
#include "nsIPrincipal.h"
#include "nsIReferrerInfo.h"
#include "nsIURI.h"
#include "nsIVariant.h"

#include "mozilla/net/PBackgroundDataBridgeChild.h"
#include "mozilla/dom/indexedDB/PBackgroundIDBFactoryChild.h"
#include "mozilla/dom/indexedDB/PBackgroundIndexedDBUtilsChild.h"
#include "mozilla/dom/PBackgroundSDBConnectionChild.h"
#include "mozilla/dom/PBackgroundLSObserverChild.h"
#include "mozilla/dom/PBackgroundLSRequestChild.h"
#include "mozilla/dom/PBackgroundLSSimpleRequestChild.h"
#include "mozilla/dom/PBackgroundLocalStorageCacheChild.h"
#include "mozilla/dom/PBackgroundSessionStorageManagerChild.h"
#include "mozilla/dom/PBackgroundSessionStorageServiceChild.h"
#include "mozilla/dom/PBackgroundStorageChild.h"
#include "mozilla/ipc/PBackgroundTestChild.h"
#include "mozilla/dom/cache/PBoundStorageKeyChild.h"
#include "mozilla/dom/PBroadcastChannelChild.h"
#include "mozilla/dom/cache/PCacheChild.h"
#include "mozilla/dom/cache/PCacheStorageChild.h"
#include "mozilla/dom/cache/PCacheStreamControlChild.h"
#include "mozilla/dom/PClientManagerChild.h"
#include "mozilla/dom/PCookieStoreChild.h"
#include "mozilla/dom/PEndpointForReportChild.h"
#include "mozilla/dom/PFileSystemManagerChild.h"
#include "mozilla/dom/PFileSystemRequestChild.h"
#include "mozilla/dom/PGamepadEventChannelChild.h"
#include "mozilla/dom/PGamepadTestChannelChild.h"
#include "mozilla/net/PHttpBackgroundChannelChild.h"
#include "mozilla/ipc/PIdleSchedulerChild.h"
#include "mozilla/dom/PRemoteWorkerControllerChild.h"
#include "mozilla/dom/PRemoteWorkerServiceChild.h"
#include "mozilla/dom/PSharedWorkerChild.h"
#include "mozilla/dom/PTemporaryIPCBlobChild.h"
#include "mozilla/dom/PFileCreatorChild.h"
#include "mozilla/dom/PMessagePortChild.h"
#include "mozilla/camera/PCamerasChild.h"
#include "mozilla/dom/locks/PLockManagerChild.h"
#include "mozilla/dom/PMIDIManagerChild.h"
#include "mozilla/dom/PMIDIPortChild.h"
#include "mozilla/dom/PMLSTransactionChild.h"
#include "mozilla/dom/quota/PQuotaChild.h"
#include "mozilla/dom/PServiceWorkerChild.h"
#include "mozilla/dom/PServiceWorkerContainerChild.h"
#include "mozilla/dom/PServiceWorkerManagerChild.h"
#include "mozilla/dom/PServiceWorkerRegistrationChild.h"
#include "mozilla/net/PUDPSocketChild.h"
#include "mozilla/dom/PVsyncChild.h"
#include "mozilla/PRemoteMediaManagerChild.h"
#include "mozilla/dom/PWebTransportChild.h"
#include "mozilla/dom/PFetchChild.h"
#include "mozilla/dom/notification/PNotificationChild.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 ipc {


auto PBackgroundChild::RecvPCacheConstructor(PCacheChild* actor) -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

auto PBackgroundChild::RecvPCacheStreamControlConstructor(PCacheStreamControlChild* actor) -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

auto PBackgroundChild::ProcessingError(
        Result aCode,
        const char* aReason) -> void
{
}

auto PBackgroundChild::ShouldContinueFromReplyTimeout() -> bool
{
    return true;
}

MOZ_IMPLICIT PBackgroundChild::PBackgroundChild() :
    mozilla::ipc::IToplevelProtocol("PBackgroundChild", kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PBackgroundChild);
}

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

auto PBackgroundChild::ActorAlloc() -> void
{
    MOZ_RELEASE_ASSERT(XRE_IsParentProcess() || XRE_IsContentProcess(), "Invalid process for `PBackgroundChild'");
    AddRef();
}

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

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

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

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

auto PBackgroundChild::ManagedPBackgroundIDBFactoryChild(nsTArray<PBackgroundIDBFactoryChild*>& aArr) const -> void
{
    mManagedPBackgroundIDBFactoryChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundIDBFactoryChild() const -> const ManagedContainer<PBackgroundIDBFactoryChild>&
{
    return mManagedPBackgroundIDBFactoryChild;
}

auto PBackgroundChild::ManagedPBackgroundIndexedDBUtilsChild(nsTArray<PBackgroundIndexedDBUtilsChild*>& aArr) const -> void
{
    mManagedPBackgroundIndexedDBUtilsChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundIndexedDBUtilsChild() const -> const ManagedContainer<PBackgroundIndexedDBUtilsChild>&
{
    return mManagedPBackgroundIndexedDBUtilsChild;
}

auto PBackgroundChild::ManagedPBackgroundSDBConnectionChild(nsTArray<PBackgroundSDBConnectionChild*>& aArr) const -> void
{
    mManagedPBackgroundSDBConnectionChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundSDBConnectionChild() const -> const ManagedContainer<PBackgroundSDBConnectionChild>&
{
    return mManagedPBackgroundSDBConnectionChild;
}

auto PBackgroundChild::ManagedPBackgroundLSObserverChild(nsTArray<PBackgroundLSObserverChild*>& aArr) const -> void
{
    mManagedPBackgroundLSObserverChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundLSObserverChild() const -> const ManagedContainer<PBackgroundLSObserverChild>&
{
    return mManagedPBackgroundLSObserverChild;
}

auto PBackgroundChild::ManagedPBackgroundLSRequestChild(nsTArray<PBackgroundLSRequestChild*>& aArr) const -> void
{
    mManagedPBackgroundLSRequestChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundLSRequestChild() const -> const ManagedContainer<PBackgroundLSRequestChild>&
{
    return mManagedPBackgroundLSRequestChild;
}

auto PBackgroundChild::ManagedPBackgroundLSSimpleRequestChild(nsTArray<PBackgroundLSSimpleRequestChild*>& aArr) const -> void
{
    mManagedPBackgroundLSSimpleRequestChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundLSSimpleRequestChild() const -> const ManagedContainer<PBackgroundLSSimpleRequestChild>&
{
    return mManagedPBackgroundLSSimpleRequestChild;
}

auto PBackgroundChild::ManagedPBackgroundLocalStorageCacheChild(nsTArray<PBackgroundLocalStorageCacheChild*>& aArr) const -> void
{
    mManagedPBackgroundLocalStorageCacheChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundLocalStorageCacheChild() const -> const ManagedContainer<PBackgroundLocalStorageCacheChild>&
{
    return mManagedPBackgroundLocalStorageCacheChild;
}

auto PBackgroundChild::ManagedPBackgroundSessionStorageManagerChild(nsTArray<PBackgroundSessionStorageManagerChild*>& aArr) const -> void
{
    mManagedPBackgroundSessionStorageManagerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundSessionStorageManagerChild() const -> const ManagedContainer<PBackgroundSessionStorageManagerChild>&
{
    return mManagedPBackgroundSessionStorageManagerChild;
}

auto PBackgroundChild::ManagedPBackgroundSessionStorageServiceChild(nsTArray<PBackgroundSessionStorageServiceChild*>& aArr) const -> void
{
    mManagedPBackgroundSessionStorageServiceChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundSessionStorageServiceChild() const -> const ManagedContainer<PBackgroundSessionStorageServiceChild>&
{
    return mManagedPBackgroundSessionStorageServiceChild;
}

auto PBackgroundChild::ManagedPBackgroundStorageChild(nsTArray<PBackgroundStorageChild*>& aArr) const -> void
{
    mManagedPBackgroundStorageChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundStorageChild() const -> const ManagedContainer<PBackgroundStorageChild>&
{
    return mManagedPBackgroundStorageChild;
}

auto PBackgroundChild::ManagedPBackgroundTestChild(nsTArray<PBackgroundTestChild*>& aArr) const -> void
{
    mManagedPBackgroundTestChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBackgroundTestChild() const -> const ManagedContainer<PBackgroundTestChild>&
{
    return mManagedPBackgroundTestChild;
}

auto PBackgroundChild::ManagedPBroadcastChannelChild(nsTArray<PBroadcastChannelChild*>& aArr) const -> void
{
    mManagedPBroadcastChannelChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPBroadcastChannelChild() const -> const ManagedContainer<PBroadcastChannelChild>&
{
    return mManagedPBroadcastChannelChild;
}

auto PBackgroundChild::ManagedPCacheChild(nsTArray<PCacheChild*>& aArr) const -> void
{
    mManagedPCacheChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPCacheChild() const -> const ManagedContainer<PCacheChild>&
{
    return mManagedPCacheChild;
}

auto PBackgroundChild::ManagedPCacheStorageChild(nsTArray<PCacheStorageChild*>& aArr) const -> void
{
    mManagedPCacheStorageChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPCacheStorageChild() const -> const ManagedContainer<PCacheStorageChild>&
{
    return mManagedPCacheStorageChild;
}

auto PBackgroundChild::ManagedPCacheStreamControlChild(nsTArray<PCacheStreamControlChild*>& aArr) const -> void
{
    mManagedPCacheStreamControlChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPCacheStreamControlChild() const -> const ManagedContainer<PCacheStreamControlChild>&
{
    return mManagedPCacheStreamControlChild;
}

auto PBackgroundChild::ManagedPClientManagerChild(nsTArray<PClientManagerChild*>& aArr) const -> void
{
    mManagedPClientManagerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPClientManagerChild() const -> const ManagedContainer<PClientManagerChild>&
{
    return mManagedPClientManagerChild;
}

auto PBackgroundChild::ManagedPCookieStoreChild(nsTArray<PCookieStoreChild*>& aArr) const -> void
{
    mManagedPCookieStoreChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPCookieStoreChild() const -> const ManagedContainer<PCookieStoreChild>&
{
    return mManagedPCookieStoreChild;
}

auto PBackgroundChild::ManagedPEndpointForReportChild(nsTArray<PEndpointForReportChild*>& aArr) const -> void
{
    mManagedPEndpointForReportChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPEndpointForReportChild() const -> const ManagedContainer<PEndpointForReportChild>&
{
    return mManagedPEndpointForReportChild;
}

auto PBackgroundChild::ManagedPFileSystemRequestChild(nsTArray<PFileSystemRequestChild*>& aArr) const -> void
{
    mManagedPFileSystemRequestChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPFileSystemRequestChild() const -> const ManagedContainer<PFileSystemRequestChild>&
{
    return mManagedPFileSystemRequestChild;
}

auto PBackgroundChild::ManagedPGamepadEventChannelChild(nsTArray<PGamepadEventChannelChild*>& aArr) const -> void
{
    mManagedPGamepadEventChannelChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPGamepadEventChannelChild() const -> const ManagedContainer<PGamepadEventChannelChild>&
{
    return mManagedPGamepadEventChannelChild;
}

auto PBackgroundChild::ManagedPGamepadTestChannelChild(nsTArray<PGamepadTestChannelChild*>& aArr) const -> void
{
    mManagedPGamepadTestChannelChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPGamepadTestChannelChild() const -> const ManagedContainer<PGamepadTestChannelChild>&
{
    return mManagedPGamepadTestChannelChild;
}

auto PBackgroundChild::ManagedPHttpBackgroundChannelChild(nsTArray<PHttpBackgroundChannelChild*>& aArr) const -> void
{
    mManagedPHttpBackgroundChannelChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPHttpBackgroundChannelChild() const -> const ManagedContainer<PHttpBackgroundChannelChild>&
{
    return mManagedPHttpBackgroundChannelChild;
}

auto PBackgroundChild::ManagedPIdleSchedulerChild(nsTArray<PIdleSchedulerChild*>& aArr) const -> void
{
    mManagedPIdleSchedulerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPIdleSchedulerChild() const -> const ManagedContainer<PIdleSchedulerChild>&
{
    return mManagedPIdleSchedulerChild;
}

auto PBackgroundChild::ManagedPLockManagerChild(nsTArray<PLockManagerChild*>& aArr) const -> void
{
    mManagedPLockManagerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPLockManagerChild() const -> const ManagedContainer<PLockManagerChild>&
{
    return mManagedPLockManagerChild;
}

auto PBackgroundChild::ManagedPRemoteWorkerControllerChild(nsTArray<PRemoteWorkerControllerChild*>& aArr) const -> void
{
    mManagedPRemoteWorkerControllerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPRemoteWorkerControllerChild() const -> const ManagedContainer<PRemoteWorkerControllerChild>&
{
    return mManagedPRemoteWorkerControllerChild;
}

auto PBackgroundChild::ManagedPSharedWorkerChild(nsTArray<PSharedWorkerChild*>& aArr) const -> void
{
    mManagedPSharedWorkerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPSharedWorkerChild() const -> const ManagedContainer<PSharedWorkerChild>&
{
    return mManagedPSharedWorkerChild;
}

auto PBackgroundChild::ManagedPTemporaryIPCBlobChild(nsTArray<PTemporaryIPCBlobChild*>& aArr) const -> void
{
    mManagedPTemporaryIPCBlobChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPTemporaryIPCBlobChild() const -> const ManagedContainer<PTemporaryIPCBlobChild>&
{
    return mManagedPTemporaryIPCBlobChild;
}

auto PBackgroundChild::ManagedPFileCreatorChild(nsTArray<PFileCreatorChild*>& aArr) const -> void
{
    mManagedPFileCreatorChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPFileCreatorChild() const -> const ManagedContainer<PFileCreatorChild>&
{
    return mManagedPFileCreatorChild;
}

auto PBackgroundChild::ManagedPMessagePortChild(nsTArray<PMessagePortChild*>& aArr) const -> void
{
    mManagedPMessagePortChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPMessagePortChild() const -> const ManagedContainer<PMessagePortChild>&
{
    return mManagedPMessagePortChild;
}

auto PBackgroundChild::ManagedPCamerasChild(nsTArray<PCamerasChild*>& aArr) const -> void
{
    mManagedPCamerasChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPCamerasChild() const -> const ManagedContainer<PCamerasChild>&
{
    return mManagedPCamerasChild;
}

auto PBackgroundChild::ManagedPQuotaChild(nsTArray<PQuotaChild*>& aArr) const -> void
{
    mManagedPQuotaChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPQuotaChild() const -> const ManagedContainer<PQuotaChild>&
{
    return mManagedPQuotaChild;
}

auto PBackgroundChild::ManagedPServiceWorkerChild(nsTArray<PServiceWorkerChild*>& aArr) const -> void
{
    mManagedPServiceWorkerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPServiceWorkerChild() const -> const ManagedContainer<PServiceWorkerChild>&
{
    return mManagedPServiceWorkerChild;
}

auto PBackgroundChild::ManagedPServiceWorkerContainerChild(nsTArray<PServiceWorkerContainerChild*>& aArr) const -> void
{
    mManagedPServiceWorkerContainerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPServiceWorkerContainerChild() const -> const ManagedContainer<PServiceWorkerContainerChild>&
{
    return mManagedPServiceWorkerContainerChild;
}

auto PBackgroundChild::ManagedPServiceWorkerManagerChild(nsTArray<PServiceWorkerManagerChild*>& aArr) const -> void
{
    mManagedPServiceWorkerManagerChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPServiceWorkerManagerChild() const -> const ManagedContainer<PServiceWorkerManagerChild>&
{
    return mManagedPServiceWorkerManagerChild;
}

auto PBackgroundChild::ManagedPServiceWorkerRegistrationChild(nsTArray<PServiceWorkerRegistrationChild*>& aArr) const -> void
{
    mManagedPServiceWorkerRegistrationChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPServiceWorkerRegistrationChild() const -> const ManagedContainer<PServiceWorkerRegistrationChild>&
{
    return mManagedPServiceWorkerRegistrationChild;
}

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

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

auto PBackgroundChild::ManagedPVsyncChild(nsTArray<PVsyncChild*>& aArr) const -> void
{
    mManagedPVsyncChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPVsyncChild() const -> const ManagedContainer<PVsyncChild>&
{
    return mManagedPVsyncChild;
}

auto PBackgroundChild::ManagedPFetchChild(nsTArray<PFetchChild*>& aArr) const -> void
{
    mManagedPFetchChild.ToArray(aArr);
}

auto PBackgroundChild::ManagedPFetchChild() const -> const ManagedContainer<PFetchChild>&
{
    return mManagedPFetchChild;
}

auto PBackgroundChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    static constexpr ::mozilla::ipc::ProtocolId sIds[] = {
        PBackgroundIDBFactoryMsgStart,
        PBackgroundIndexedDBUtilsMsgStart,
        PBackgroundSDBConnectionMsgStart,
        PBackgroundLSObserverMsgStart,
        PBackgroundLSRequestMsgStart,
        PBackgroundLSSimpleRequestMsgStart,
        PBackgroundLocalStorageCacheMsgStart,
        PBackgroundSessionStorageManagerMsgStart,
        PBackgroundSessionStorageServiceMsgStart,
        PBackgroundStorageMsgStart,
        PBackgroundTestMsgStart,
        PBroadcastChannelMsgStart,
        PCacheMsgStart,
        PCacheStorageMsgStart,
        PCacheStreamControlMsgStart,
        PClientManagerMsgStart,
        PCookieStoreMsgStart,
        PEndpointForReportMsgStart,
        PFileSystemRequestMsgStart,
        PGamepadEventChannelMsgStart,
        PGamepadTestChannelMsgStart,
        PHttpBackgroundChannelMsgStart,
        PIdleSchedulerMsgStart,
        PLockManagerMsgStart,
        PRemoteWorkerControllerMsgStart,
        PSharedWorkerMsgStart,
        PTemporaryIPCBlobMsgStart,
        PFileCreatorMsgStart,
        PMessagePortMsgStart,
        PCamerasMsgStart,
        PQuotaMsgStart,
        PServiceWorkerMsgStart,
        PServiceWorkerContainerMsgStart,
        PServiceWorkerManagerMsgStart,
        PServiceWorkerRegistrationMsgStart,
        PUDPSocketMsgStart,
        PVsyncMsgStart,
        PFetchMsgStart
    };
    return sIds;
}

auto PBackgroundChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    case PBackgroundIDBFactoryMsgStart:
        return (&(mManagedPBackgroundIDBFactoryChild));
    case PBackgroundIndexedDBUtilsMsgStart:
        return (&(mManagedPBackgroundIndexedDBUtilsChild));
    case PBackgroundSDBConnectionMsgStart:
        return (&(mManagedPBackgroundSDBConnectionChild));
    case PBackgroundLSObserverMsgStart:
        return (&(mManagedPBackgroundLSObserverChild));
    case PBackgroundLSRequestMsgStart:
        return (&(mManagedPBackgroundLSRequestChild));
    case PBackgroundLSSimpleRequestMsgStart:
        return (&(mManagedPBackgroundLSSimpleRequestChild));
    case PBackgroundLocalStorageCacheMsgStart:
        return (&(mManagedPBackgroundLocalStorageCacheChild));
    case PBackgroundSessionStorageManagerMsgStart:
        return (&(mManagedPBackgroundSessionStorageManagerChild));
    case PBackgroundSessionStorageServiceMsgStart:
        return (&(mManagedPBackgroundSessionStorageServiceChild));
    case PBackgroundStorageMsgStart:
        return (&(mManagedPBackgroundStorageChild));
    case PBackgroundTestMsgStart:
        return (&(mManagedPBackgroundTestChild));
    case PBroadcastChannelMsgStart:
        return (&(mManagedPBroadcastChannelChild));
    case PCacheMsgStart:
        return (&(mManagedPCacheChild));
    case PCacheStorageMsgStart:
        return (&(mManagedPCacheStorageChild));
    case PCacheStreamControlMsgStart:
        return (&(mManagedPCacheStreamControlChild));
    case PClientManagerMsgStart:
        return (&(mManagedPClientManagerChild));
    case PCookieStoreMsgStart:
        return (&(mManagedPCookieStoreChild));
    case PEndpointForReportMsgStart:
        return (&(mManagedPEndpointForReportChild));
    case PFileSystemRequestMsgStart:
        return (&(mManagedPFileSystemRequestChild));
    case PGamepadEventChannelMsgStart:
        return (&(mManagedPGamepadEventChannelChild));
    case PGamepadTestChannelMsgStart:
        return (&(mManagedPGamepadTestChannelChild));
    case PHttpBackgroundChannelMsgStart:
        return (&(mManagedPHttpBackgroundChannelChild));
    case PIdleSchedulerMsgStart:
        return (&(mManagedPIdleSchedulerChild));
    case PLockManagerMsgStart:
        return (&(mManagedPLockManagerChild));
    case PRemoteWorkerControllerMsgStart:
        return (&(mManagedPRemoteWorkerControllerChild));
    case PSharedWorkerMsgStart:
        return (&(mManagedPSharedWorkerChild));
    case PTemporaryIPCBlobMsgStart:
        return (&(mManagedPTemporaryIPCBlobChild));
    case PFileCreatorMsgStart:
        return (&(mManagedPFileCreatorChild));
    case PMessagePortMsgStart:
        return (&(mManagedPMessagePortChild));
    case PCamerasMsgStart:
        return (&(mManagedPCamerasChild));
    case PQuotaMsgStart:
        return (&(mManagedPQuotaChild));
    case PServiceWorkerMsgStart:
        return (&(mManagedPServiceWorkerChild));
    case PServiceWorkerContainerMsgStart:
        return (&(mManagedPServiceWorkerContainerChild));
    case PServiceWorkerManagerMsgStart:
        return (&(mManagedPServiceWorkerManagerChild));
    case PServiceWorkerRegistrationMsgStart:
        return (&(mManagedPServiceWorkerRegistrationChild));
    case PUDPSocketMsgStart:
        return (&(mManagedPUDPSocketChild));
    case PVsyncMsgStart:
        return (&(mManagedPVsyncChild));
    case PFetchMsgStart:
        return (&(mManagedPFetchChild));
    default:
        return nullptr;
    }
}

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

auto PBackgroundChild::OpenPBackgroundIDBFactoryEndpoint(PBackgroundIDBFactoryChild* aActor) -> ManagedEndpoint<PBackgroundIDBFactoryParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundIDBFactoryChild actor");
        return ManagedEndpoint<PBackgroundIDBFactoryParent>();
    }

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

    // 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<PBackgroundIDBFactoryParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundIDBFactoryEndpoint(
        ManagedEndpoint<PBackgroundIDBFactoryChild> aEndpoint,
        PBackgroundIDBFactoryChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundIndexedDBUtilsEndpoint(PBackgroundIndexedDBUtilsChild* aActor) -> ManagedEndpoint<PBackgroundIndexedDBUtilsParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundIndexedDBUtilsChild actor");
        return ManagedEndpoint<PBackgroundIndexedDBUtilsParent>();
    }

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

    // 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<PBackgroundIndexedDBUtilsParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundIndexedDBUtilsEndpoint(
        ManagedEndpoint<PBackgroundIndexedDBUtilsChild> aEndpoint,
        PBackgroundIndexedDBUtilsChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundSDBConnectionEndpoint(PBackgroundSDBConnectionChild* aActor) -> ManagedEndpoint<PBackgroundSDBConnectionParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundSDBConnectionChild actor");
        return ManagedEndpoint<PBackgroundSDBConnectionParent>();
    }

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

    // 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<PBackgroundSDBConnectionParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundSDBConnectionEndpoint(
        ManagedEndpoint<PBackgroundSDBConnectionChild> aEndpoint,
        PBackgroundSDBConnectionChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundLSObserverEndpoint(PBackgroundLSObserverChild* aActor) -> ManagedEndpoint<PBackgroundLSObserverParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundLSObserverChild actor");
        return ManagedEndpoint<PBackgroundLSObserverParent>();
    }

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

    // 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<PBackgroundLSObserverParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundLSObserverEndpoint(
        ManagedEndpoint<PBackgroundLSObserverChild> aEndpoint,
        PBackgroundLSObserverChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundLSRequestEndpoint(PBackgroundLSRequestChild* aActor) -> ManagedEndpoint<PBackgroundLSRequestParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundLSRequestChild actor");
        return ManagedEndpoint<PBackgroundLSRequestParent>();
    }

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

    // 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<PBackgroundLSRequestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundLSRequestEndpoint(
        ManagedEndpoint<PBackgroundLSRequestChild> aEndpoint,
        PBackgroundLSRequestChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundLSSimpleRequestEndpoint(PBackgroundLSSimpleRequestChild* aActor) -> ManagedEndpoint<PBackgroundLSSimpleRequestParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundLSSimpleRequestChild actor");
        return ManagedEndpoint<PBackgroundLSSimpleRequestParent>();
    }

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

    // 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<PBackgroundLSSimpleRequestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundLSSimpleRequestEndpoint(
        ManagedEndpoint<PBackgroundLSSimpleRequestChild> aEndpoint,
        PBackgroundLSSimpleRequestChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundLocalStorageCacheEndpoint(PBackgroundLocalStorageCacheChild* aActor) -> ManagedEndpoint<PBackgroundLocalStorageCacheParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundLocalStorageCacheChild actor");
        return ManagedEndpoint<PBackgroundLocalStorageCacheParent>();
    }

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

    // 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<PBackgroundLocalStorageCacheParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundLocalStorageCacheEndpoint(
        ManagedEndpoint<PBackgroundLocalStorageCacheChild> aEndpoint,
        PBackgroundLocalStorageCacheChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundSessionStorageManagerEndpoint(PBackgroundSessionStorageManagerChild* aActor) -> ManagedEndpoint<PBackgroundSessionStorageManagerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundSessionStorageManagerChild actor");
        return ManagedEndpoint<PBackgroundSessionStorageManagerParent>();
    }

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

    // 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<PBackgroundSessionStorageManagerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundSessionStorageManagerEndpoint(
        ManagedEndpoint<PBackgroundSessionStorageManagerChild> aEndpoint,
        PBackgroundSessionStorageManagerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundSessionStorageServiceEndpoint(PBackgroundSessionStorageServiceChild* aActor) -> ManagedEndpoint<PBackgroundSessionStorageServiceParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundSessionStorageServiceChild actor");
        return ManagedEndpoint<PBackgroundSessionStorageServiceParent>();
    }

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

    // 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<PBackgroundSessionStorageServiceParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundSessionStorageServiceEndpoint(
        ManagedEndpoint<PBackgroundSessionStorageServiceChild> aEndpoint,
        PBackgroundSessionStorageServiceChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundStorageEndpoint(PBackgroundStorageChild* aActor) -> ManagedEndpoint<PBackgroundStorageParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundStorageChild actor");
        return ManagedEndpoint<PBackgroundStorageParent>();
    }

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

    // 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<PBackgroundStorageParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundStorageEndpoint(
        ManagedEndpoint<PBackgroundStorageChild> aEndpoint,
        PBackgroundStorageChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBackgroundTestEndpoint(PBackgroundTestChild* aActor) -> ManagedEndpoint<PBackgroundTestParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBackgroundTestChild actor");
        return ManagedEndpoint<PBackgroundTestParent>();
    }

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

    // 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<PBackgroundTestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBackgroundTestEndpoint(
        ManagedEndpoint<PBackgroundTestChild> aEndpoint,
        PBackgroundTestChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPBroadcastChannelEndpoint(PBroadcastChannelChild* aActor) -> ManagedEndpoint<PBroadcastChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PBroadcastChannelChild actor");
        return ManagedEndpoint<PBroadcastChannelParent>();
    }

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

    // 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<PBroadcastChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPBroadcastChannelEndpoint(
        ManagedEndpoint<PBroadcastChannelChild> aEndpoint,
        PBroadcastChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPCacheEndpoint(PCacheChild* aActor) -> ManagedEndpoint<PCacheParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PCacheChild actor");
        return ManagedEndpoint<PCacheParent>();
    }

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

    // 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<PCacheParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPCacheEndpoint(
        ManagedEndpoint<PCacheChild> aEndpoint,
        PCacheChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPCacheStorageEndpoint(PCacheStorageChild* aActor) -> ManagedEndpoint<PCacheStorageParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PCacheStorageChild actor");
        return ManagedEndpoint<PCacheStorageParent>();
    }

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

    // 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<PCacheStorageParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPCacheStorageEndpoint(
        ManagedEndpoint<PCacheStorageChild> aEndpoint,
        PCacheStorageChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPCacheStreamControlEndpoint(PCacheStreamControlChild* aActor) -> ManagedEndpoint<PCacheStreamControlParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PCacheStreamControlChild actor");
        return ManagedEndpoint<PCacheStreamControlParent>();
    }

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

    // 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<PCacheStreamControlParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPCacheStreamControlEndpoint(
        ManagedEndpoint<PCacheStreamControlChild> aEndpoint,
        PCacheStreamControlChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPClientManagerEndpoint(PClientManagerChild* aActor) -> ManagedEndpoint<PClientManagerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PClientManagerChild actor");
        return ManagedEndpoint<PClientManagerParent>();
    }

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

    // 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<PClientManagerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPClientManagerEndpoint(
        ManagedEndpoint<PClientManagerChild> aEndpoint,
        PClientManagerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPCookieStoreEndpoint(PCookieStoreChild* aActor) -> ManagedEndpoint<PCookieStoreParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PCookieStoreChild actor");
        return ManagedEndpoint<PCookieStoreParent>();
    }

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

    // 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<PCookieStoreParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPCookieStoreEndpoint(
        ManagedEndpoint<PCookieStoreChild> aEndpoint,
        PCookieStoreChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPEndpointForReportEndpoint(PEndpointForReportChild* aActor) -> ManagedEndpoint<PEndpointForReportParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PEndpointForReportChild actor");
        return ManagedEndpoint<PEndpointForReportParent>();
    }

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

    // 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<PEndpointForReportParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPEndpointForReportEndpoint(
        ManagedEndpoint<PEndpointForReportChild> aEndpoint,
        PEndpointForReportChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPFileSystemRequestEndpoint(PFileSystemRequestChild* aActor) -> ManagedEndpoint<PFileSystemRequestParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PFileSystemRequestChild actor");
        return ManagedEndpoint<PFileSystemRequestParent>();
    }

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

    // 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<PFileSystemRequestParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPFileSystemRequestEndpoint(
        ManagedEndpoint<PFileSystemRequestChild> aEndpoint,
        PFileSystemRequestChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPGamepadEventChannelEndpoint(PGamepadEventChannelChild* aActor) -> ManagedEndpoint<PGamepadEventChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PGamepadEventChannelChild actor");
        return ManagedEndpoint<PGamepadEventChannelParent>();
    }

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

    // 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<PGamepadEventChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPGamepadEventChannelEndpoint(
        ManagedEndpoint<PGamepadEventChannelChild> aEndpoint,
        PGamepadEventChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPGamepadTestChannelEndpoint(PGamepadTestChannelChild* aActor) -> ManagedEndpoint<PGamepadTestChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PGamepadTestChannelChild actor");
        return ManagedEndpoint<PGamepadTestChannelParent>();
    }

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

    // 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<PGamepadTestChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPGamepadTestChannelEndpoint(
        ManagedEndpoint<PGamepadTestChannelChild> aEndpoint,
        PGamepadTestChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPHttpBackgroundChannelEndpoint(PHttpBackgroundChannelChild* aActor) -> ManagedEndpoint<PHttpBackgroundChannelParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PHttpBackgroundChannelChild actor");
        return ManagedEndpoint<PHttpBackgroundChannelParent>();
    }

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

    // 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<PHttpBackgroundChannelParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPHttpBackgroundChannelEndpoint(
        ManagedEndpoint<PHttpBackgroundChannelChild> aEndpoint,
        PHttpBackgroundChannelChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPIdleSchedulerEndpoint(PIdleSchedulerChild* aActor) -> ManagedEndpoint<PIdleSchedulerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PIdleSchedulerChild actor");
        return ManagedEndpoint<PIdleSchedulerParent>();
    }

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

    // 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<PIdleSchedulerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPIdleSchedulerEndpoint(
        ManagedEndpoint<PIdleSchedulerChild> aEndpoint,
        PIdleSchedulerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPLockManagerEndpoint(PLockManagerChild* aActor) -> ManagedEndpoint<PLockManagerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PLockManagerChild actor");
        return ManagedEndpoint<PLockManagerParent>();
    }

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

    // 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<PLockManagerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPLockManagerEndpoint(
        ManagedEndpoint<PLockManagerChild> aEndpoint,
        PLockManagerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPRemoteWorkerControllerEndpoint(PRemoteWorkerControllerChild* aActor) -> ManagedEndpoint<PRemoteWorkerControllerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PRemoteWorkerControllerChild actor");
        return ManagedEndpoint<PRemoteWorkerControllerParent>();
    }

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

    // 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<PRemoteWorkerControllerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPRemoteWorkerControllerEndpoint(
        ManagedEndpoint<PRemoteWorkerControllerChild> aEndpoint,
        PRemoteWorkerControllerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPSharedWorkerEndpoint(PSharedWorkerChild* aActor) -> ManagedEndpoint<PSharedWorkerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PSharedWorkerChild actor");
        return ManagedEndpoint<PSharedWorkerParent>();
    }

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

    // 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<PSharedWorkerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPSharedWorkerEndpoint(
        ManagedEndpoint<PSharedWorkerChild> aEndpoint,
        PSharedWorkerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPTemporaryIPCBlobEndpoint(PTemporaryIPCBlobChild* aActor) -> ManagedEndpoint<PTemporaryIPCBlobParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PTemporaryIPCBlobChild actor");
        return ManagedEndpoint<PTemporaryIPCBlobParent>();
    }

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

    // 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<PTemporaryIPCBlobParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPTemporaryIPCBlobEndpoint(
        ManagedEndpoint<PTemporaryIPCBlobChild> aEndpoint,
        PTemporaryIPCBlobChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPFileCreatorEndpoint(PFileCreatorChild* aActor) -> ManagedEndpoint<PFileCreatorParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PFileCreatorChild actor");
        return ManagedEndpoint<PFileCreatorParent>();
    }

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

    // 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<PFileCreatorParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPFileCreatorEndpoint(
        ManagedEndpoint<PFileCreatorChild> aEndpoint,
        PFileCreatorChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPMessagePortEndpoint(PMessagePortChild* aActor) -> ManagedEndpoint<PMessagePortParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PMessagePortChild actor");
        return ManagedEndpoint<PMessagePortParent>();
    }

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

    // 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<PMessagePortParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPMessagePortEndpoint(
        ManagedEndpoint<PMessagePortChild> aEndpoint,
        PMessagePortChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPCamerasEndpoint(PCamerasChild* aActor) -> ManagedEndpoint<PCamerasParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PCamerasChild actor");
        return ManagedEndpoint<PCamerasParent>();
    }

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

    // 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<PCamerasParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPCamerasEndpoint(
        ManagedEndpoint<PCamerasChild> aEndpoint,
        PCamerasChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPQuotaEndpoint(PQuotaChild* aActor) -> ManagedEndpoint<PQuotaParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PQuotaChild actor");
        return ManagedEndpoint<PQuotaParent>();
    }

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

    // 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<PQuotaParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPQuotaEndpoint(
        ManagedEndpoint<PQuotaChild> aEndpoint,
        PQuotaChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPServiceWorkerEndpoint(PServiceWorkerChild* aActor) -> ManagedEndpoint<PServiceWorkerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PServiceWorkerChild actor");
        return ManagedEndpoint<PServiceWorkerParent>();
    }

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

    // 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<PServiceWorkerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPServiceWorkerEndpoint(
        ManagedEndpoint<PServiceWorkerChild> aEndpoint,
        PServiceWorkerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPServiceWorkerContainerEndpoint(PServiceWorkerContainerChild* aActor) -> ManagedEndpoint<PServiceWorkerContainerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PServiceWorkerContainerChild actor");
        return ManagedEndpoint<PServiceWorkerContainerParent>();
    }

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

    // 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<PServiceWorkerContainerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPServiceWorkerContainerEndpoint(
        ManagedEndpoint<PServiceWorkerContainerChild> aEndpoint,
        PServiceWorkerContainerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPServiceWorkerManagerEndpoint(PServiceWorkerManagerChild* aActor) -> ManagedEndpoint<PServiceWorkerManagerParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PServiceWorkerManagerChild actor");
        return ManagedEndpoint<PServiceWorkerManagerParent>();
    }

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

    // 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<PServiceWorkerManagerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPServiceWorkerManagerEndpoint(
        ManagedEndpoint<PServiceWorkerManagerChild> aEndpoint,
        PServiceWorkerManagerChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPServiceWorkerRegistrationEndpoint(PServiceWorkerRegistrationChild* aActor) -> ManagedEndpoint<PServiceWorkerRegistrationParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PServiceWorkerRegistrationChild actor");
        return ManagedEndpoint<PServiceWorkerRegistrationParent>();
    }

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

    // 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<PServiceWorkerRegistrationParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPServiceWorkerRegistrationEndpoint(
        ManagedEndpoint<PServiceWorkerRegistrationChild> aEndpoint,
        PServiceWorkerRegistrationChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::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 PBackgroundChild::BindPUDPSocketEndpoint(
        ManagedEndpoint<PUDPSocketChild> aEndpoint,
        PUDPSocketChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPVsyncEndpoint(PVsyncChild* aActor) -> ManagedEndpoint<PVsyncParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PVsyncChild actor");
        return ManagedEndpoint<PVsyncParent>();
    }

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

    // 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<PVsyncParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPVsyncEndpoint(
        ManagedEndpoint<PVsyncChild> aEndpoint,
        PVsyncChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::OpenPFetchEndpoint(PFetchChild* aActor) -> ManagedEndpoint<PFetchParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PFetchChild actor");
        return ManagedEndpoint<PFetchParent>();
    }

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

    // 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<PFetchParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PBackgroundChild::BindPFetchEndpoint(
        ManagedEndpoint<PFetchChild> aEndpoint,
        PFetchChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PBackgroundChild::SendPBackgroundTestConstructor(const nsACString& testArg) -> PBackgroundTestChild*
{
    PBackgroundTestChild* actor = (this)->AllocPBackgroundTestChild(testArg);
    return SendPBackgroundTestConstructor(std::move(actor), std::move(testArg));
}

auto PBackgroundChild::SendPBackgroundTestConstructor(
        PBackgroundTestChild* actor,
        const nsACString& testArg) -> PBackgroundTestChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundTestChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundTestConstructor", 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 PBackgroundTestChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundIDBFactoryConstructor(
        PBackgroundIDBFactoryChild* actor,
        const LoggingInfo& loggingInfo,
        const nsACString& systemLocale) -> PBackgroundIDBFactoryChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundIDBFactoryChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundIDBFactoryConstructor", 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 PBackgroundIDBFactoryChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundIndexedDBUtilsConstructor() -> PBackgroundIndexedDBUtilsChild*
{
    PBackgroundIndexedDBUtilsChild* actor = (this)->AllocPBackgroundIndexedDBUtilsChild();
    return SendPBackgroundIndexedDBUtilsConstructor(std::move(actor));
}

auto PBackgroundChild::SendPBackgroundIndexedDBUtilsConstructor(PBackgroundIndexedDBUtilsChild* actor) -> PBackgroundIndexedDBUtilsChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundIndexedDBUtilsChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PBackgroundIndexedDBUtilsConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundIndexedDBUtilsConstructor", 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 PBackgroundIndexedDBUtilsChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendFlushPendingFileDeletions() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_FlushPendingFileDeletions(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

auto PBackgroundChild::SendPBackgroundSDBConnectionConstructor(
        PBackgroundSDBConnectionChild* actor,
        const PersistenceType& persistenceType,
        const PrincipalInfo& principalInfo) -> PBackgroundSDBConnectionChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundSDBConnectionChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundSDBConnectionConstructor", 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 PBackgroundSDBConnectionChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundLSObserverConstructor(const uint64_t& observerId) -> PBackgroundLSObserverChild*
{
    PBackgroundLSObserverChild* actor = (this)->AllocPBackgroundLSObserverChild(observerId);
    return SendPBackgroundLSObserverConstructor(std::move(actor), std::move(observerId));
}

auto PBackgroundChild::SendPBackgroundLSObserverConstructor(
        PBackgroundLSObserverChild* actor,
        const uint64_t& observerId) -> PBackgroundLSObserverChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundLSObserverChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundLSObserverConstructor", 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 PBackgroundLSObserverChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundLSRequestConstructor(const LSRequestParams& params) -> PBackgroundLSRequestChild*
{
    PBackgroundLSRequestChild* actor = (this)->AllocPBackgroundLSRequestChild(params);
    return SendPBackgroundLSRequestConstructor(std::move(actor), std::move(params));
}

auto PBackgroundChild::SendPBackgroundLSRequestConstructor(
        PBackgroundLSRequestChild* actor,
        const LSRequestParams& params) -> PBackgroundLSRequestChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundLSRequestChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundLSRequestConstructor", 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 PBackgroundLSRequestChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundLSSimpleRequestConstructor(const LSSimpleRequestParams& params) -> PBackgroundLSSimpleRequestChild*
{
    PBackgroundLSSimpleRequestChild* actor = (this)->AllocPBackgroundLSSimpleRequestChild(params);
    return SendPBackgroundLSSimpleRequestConstructor(std::move(actor), std::move(params));
}

auto PBackgroundChild::SendPBackgroundLSSimpleRequestConstructor(
        PBackgroundLSSimpleRequestChild* actor,
        const LSSimpleRequestParams& params) -> PBackgroundLSSimpleRequestChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundLSSimpleRequestChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundLSSimpleRequestConstructor", 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 PBackgroundLSSimpleRequestChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundLocalStorageCacheConstructor(
        const PrincipalInfo& principalInfo,
        const nsACString& originKey,
        const uint32_t& privateBrowsingId) -> PBackgroundLocalStorageCacheChild*
{
    PBackgroundLocalStorageCacheChild* actor = (this)->AllocPBackgroundLocalStorageCacheChild(principalInfo, originKey, privateBrowsingId);
    return SendPBackgroundLocalStorageCacheConstructor(std::move(actor), std::move(principalInfo), std::move(originKey), std::move(privateBrowsingId));
}

auto PBackgroundChild::SendPBackgroundLocalStorageCacheConstructor(
        PBackgroundLocalStorageCacheChild* actor,
        const PrincipalInfo& principalInfo,
        const nsACString& originKey,
        const uint32_t& privateBrowsingId) -> PBackgroundLocalStorageCacheChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundLocalStorageCacheChild actor");
        return nullptr;
    }

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


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

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), principalInfo);
    // Sentinel = 'principalInfo'
    ((&(writer__)))->WriteSentinel(633472335);
    IPC::WriteParam((&(writer__)), originKey);
    // Sentinel = 'originKey'
    ((&(writer__)))->WriteSentinel(313656242);
    IPC::WriteParam((&(writer__)), privateBrowsingId);
    // Sentinel = 'privateBrowsingId'
    ((&(writer__)))->WriteSentinel(1071711988);


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundLocalStorageCacheConstructor", 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 PBackgroundLocalStorageCacheChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundSessionStorageManagerConstructor(
        PBackgroundSessionStorageManagerChild* actor,
        const uint64_t& aTopContextId) -> PBackgroundSessionStorageManagerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundSessionStorageManagerChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundSessionStorageManagerConstructor", 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 PBackgroundSessionStorageManagerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundSessionStorageServiceConstructor(PBackgroundSessionStorageServiceChild* actor) -> PBackgroundSessionStorageServiceChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundSessionStorageServiceChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PBackgroundSessionStorageServiceConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundSessionStorageServiceConstructor", 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 PBackgroundSessionStorageServiceChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPBackgroundStorageConstructor(
        const nsAString& profilePath,
        const uint32_t& privateBrowsingId) -> PBackgroundStorageChild*
{
    PBackgroundStorageChild* actor = (this)->AllocPBackgroundStorageChild(profilePath, privateBrowsingId);
    return SendPBackgroundStorageConstructor(std::move(actor), std::move(profilePath), std::move(privateBrowsingId));
}

auto PBackgroundChild::SendPBackgroundStorageConstructor(
        PBackgroundStorageChild* actor,
        const nsAString& profilePath,
        const uint32_t& privateBrowsingId) -> PBackgroundStorageChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBackgroundStorageChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBackgroundStorageConstructor", 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 PBackgroundStorageChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendCreateFileSystemManagerParent(
        const PrincipalInfo& principalInfo,
        Endpoint<::mozilla::dom::PFileSystemManagerParent>&& aParentEndpoint,
        mozilla::ipc::ResolveCallback<nsresult>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateFileSystemManagerParent(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), principalInfo);
    // Sentinel = 'principalInfo'
    ((&(writer__)))->WriteSentinel(633472335);
    IPC::WriteParam((&(writer__)), std::move(aParentEndpoint));
    // Sentinel = 'aParentEndpoint'
    ((&(writer__)))->WriteSentinel(789775885);


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

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

            }
            auto& rv = *maybe__rv;
            // Sentinel = 'rv'
            if ((!((aReader)->ReadSentinel(22806761)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }


            aReader->EndRead();

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

auto PBackgroundChild::SendCreateFileSystemManagerParent(
        const PrincipalInfo& principalInfo,
        Endpoint<::mozilla::dom::PFileSystemManagerParent>&& aParentEndpoint) -> RefPtr<CreateFileSystemManagerParentPromise>
{
    RefPtr<MozPromise<nsresult, ResponseRejectReason, true>::Private> promise__ = new MozPromise<nsresult, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendCreateFileSystemManagerParent(std::move(principalInfo), std::move(aParentEndpoint), [promise__](nsresult&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::SendCreateWebTransportParent(
        const nsAString& aURL,
        nsIPrincipal* aPrincipal,
        const mozilla::Maybe<IPCClientInfo>& aClientInfo,
        const bool& aDedicated,
        const bool& aRequireUnreliable,
        const uint32_t& aCongestionControl,
        mozilla::Span<WebTransportHash const> aServerCertHashes,
        Endpoint<::mozilla::dom::PWebTransportParent>&& aParentEndpoint,
        mozilla::ipc::ResolveCallback<std::tuple<nsresult, uint8_t>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateWebTransportParent(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aURL);
    // Sentinel = 'aURL'
    ((&(writer__)))->WriteSentinel(58130773);
    IPC::WriteParam((&(writer__)), aPrincipal);
    // Sentinel = 'aPrincipal'
    ((&(writer__)))->WriteSentinel(364381188);
    IPC::WriteParam((&(writer__)), aClientInfo);
    // Sentinel = 'aClientInfo'
    ((&(writer__)))->WriteSentinel(422315085);
    IPC::WriteParam((&(writer__)), aDedicated);
    // Sentinel = 'aDedicated'
    ((&(writer__)))->WriteSentinel(344916953);
    IPC::WriteParam((&(writer__)), aRequireUnreliable);
    // Sentinel = 'aRequireUnreliable'
    ((&(writer__)))->WriteSentinel(1152255810);
    IPC::WriteParam((&(writer__)), aCongestionControl);
    // Sentinel = 'aCongestionControl'
    ((&(writer__)))->WriteSentinel(1146226524);
    IPC::WriteParam((&(writer__)), aServerCertHashes);
    // Sentinel = 'aServerCertHashes'
    ((&(writer__)))->WriteSentinel(1010173635);
    IPC::WriteParam((&(writer__)), std::move(aParentEndpoint));
    // Sentinel = 'aParentEndpoint'
    ((&(writer__)))->WriteSentinel(789775885);


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

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

            }
            auto& rv = *maybe__rv;
            // Sentinel = 'rv'
            if ((!((aReader)->ReadSentinel(22806761)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            auto maybe__aReliability = IPC::ReadParam<uint8_t>(aReader);
            if (!maybe__aReliability) {
                (aReader)->FatalError("Error deserializing 'uint8_t'");
                return MsgValueError;

            }
            auto& aReliability = *maybe__aReliability;
            // Sentinel = 'aReliability'
            if ((!((aReader)->ReadSentinel(510657756)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t'");
                return MsgValueError;
            }


            aReader->EndRead();

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

auto PBackgroundChild::SendCreateWebTransportParent(
        const nsAString& aURL,
        nsIPrincipal* aPrincipal,
        const mozilla::Maybe<IPCClientInfo>& aClientInfo,
        const bool& aDedicated,
        const bool& aRequireUnreliable,
        const uint32_t& aCongestionControl,
        mozilla::Span<WebTransportHash const> aServerCertHashes,
        Endpoint<::mozilla::dom::PWebTransportParent>&& aParentEndpoint) -> RefPtr<CreateWebTransportParentPromise>
{
    RefPtr<MozPromise<std::tuple<nsresult, uint8_t>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<nsresult, uint8_t>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendCreateWebTransportParent(std::move(aURL), std::move(aPrincipal), std::move(aClientInfo), std::move(aDedicated), std::move(aRequireUnreliable), std::move(aCongestionControl), std::move(aServerCertHashes), std::move(aParentEndpoint), [promise__](std::tuple<nsresult, uint8_t>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::SendCreateNotificationParent(
        Endpoint<::mozilla::dom::notification::PNotificationParent>&& aParentEndpoint,
        mozilla::NotNull<nsIPrincipal*> aPrincipal,
        mozilla::NotNull<nsIPrincipal*> aEffectiveStoragePrincipal,
        const bool& aIsSecureContext,
        const nsAString& aScope,
        const IPCNotification& aNotification,
        mozilla::ipc::ResolveCallback<bool>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateNotificationParent(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(aParentEndpoint));
    // Sentinel = 'aParentEndpoint'
    ((&(writer__)))->WriteSentinel(789775885);
    IPC::WriteParam((&(writer__)), aPrincipal);
    // Sentinel = 'aPrincipal'
    ((&(writer__)))->WriteSentinel(364381188);
    IPC::WriteParam((&(writer__)), aEffectiveStoragePrincipal);
    // Sentinel = 'aEffectiveStoragePrincipal'
    ((&(writer__)))->WriteSentinel(2327513706);
    IPC::WriteParam((&(writer__)), aIsSecureContext);
    // Sentinel = 'aIsSecureContext'
    ((&(writer__)))->WriteSentinel(882443882);
    IPC::WriteParam((&(writer__)), aScope);
    // Sentinel = 'aScope'
    ((&(writer__)))->WriteSentinel(134808156);
    IPC::WriteParam((&(writer__)), aNotification);
    // Sentinel = 'aNotification'
    ((&(writer__)))->WriteSentinel(607978825);


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

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

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


            aReader->EndRead();

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

auto PBackgroundChild::SendCreateNotificationParent(
        Endpoint<::mozilla::dom::notification::PNotificationParent>&& aParentEndpoint,
        mozilla::NotNull<nsIPrincipal*> aPrincipal,
        mozilla::NotNull<nsIPrincipal*> aEffectiveStoragePrincipal,
        const bool& aIsSecureContext,
        const nsAString& aScope,
        const IPCNotification& aNotification) -> RefPtr<CreateNotificationParentPromise>
{
    RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendCreateNotificationParent(std::move(aParentEndpoint), std::move(aPrincipal), std::move(aEffectiveStoragePrincipal), std::move(aIsSecureContext), std::move(aScope), std::move(aNotification), [promise__](bool&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::SendPVsyncConstructor(PVsyncChild* actor) -> PVsyncChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PVsyncChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PVsyncConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PVsyncConstructor", 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 PVsyncChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPCamerasConstructor() -> PCamerasChild*
{
    PCamerasChild* actor = (this)->AllocPCamerasChild();
    return SendPCamerasConstructor(std::move(actor));
}

auto PBackgroundChild::SendPCamerasConstructor(PCamerasChild* actor) -> PCamerasChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PCamerasChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PCamerasConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PCamerasConstructor", 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 PCamerasChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPUDPSocketConstructor(
        const mozilla::Maybe<PrincipalInfo>& pInfo,
        const nsACString& filter) -> PUDPSocketChild*
{
    PUDPSocketChild* actor = (this)->AllocPUDPSocketChild(pInfo, filter);
    return SendPUDPSocketConstructor(std::move(actor), std::move(pInfo), std::move(filter));
}

auto PBackgroundChild::SendPUDPSocketConstructor(
        PUDPSocketChild* actor,
        const mozilla::Maybe<PrincipalInfo>& pInfo,
        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__ = PBackground::Msg_PUDPSocketConstructor(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), pInfo);
    // Sentinel = 'pInfo'
    ((&(writer__)))->WriteSentinel(98435581);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::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 PBackgroundChild::SendPBroadcastChannelConstructor(
        const PrincipalInfo& pInfo,
        const nsACString& origin,
        const nsAString& channel) -> PBroadcastChannelChild*
{
    PBroadcastChannelChild* actor = (this)->AllocPBroadcastChannelChild(pInfo, origin, channel);
    return SendPBroadcastChannelConstructor(std::move(actor), std::move(pInfo), std::move(origin), std::move(channel));
}

auto PBackgroundChild::SendPBroadcastChannelConstructor(
        PBroadcastChannelChild* actor,
        const PrincipalInfo& pInfo,
        const nsACString& origin,
        const nsAString& channel) -> PBroadcastChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PBroadcastChannelChild actor");
        return nullptr;
    }

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


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

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), pInfo);
    // Sentinel = 'pInfo'
    ((&(writer__)))->WriteSentinel(98435581);
    IPC::WriteParam((&(writer__)), origin);
    // Sentinel = 'origin'
    ((&(writer__)))->WriteSentinel(150143625);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PBroadcastChannelConstructor", 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 PBroadcastChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPCookieStoreConstructor() -> PCookieStoreChild*
{
    PCookieStoreChild* actor = (this)->AllocPCookieStoreChild();
    return SendPCookieStoreConstructor(std::move(actor));
}

auto PBackgroundChild::SendPCookieStoreConstructor(PCookieStoreChild* actor) -> PCookieStoreChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PCookieStoreChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PCookieStoreConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PCookieStoreConstructor", 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 PCookieStoreChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPServiceWorkerManagerConstructor() -> PServiceWorkerManagerChild*
{
    PServiceWorkerManagerChild* actor = (this)->AllocPServiceWorkerManagerChild();
    return SendPServiceWorkerManagerConstructor(std::move(actor));
}

auto PBackgroundChild::SendPServiceWorkerManagerConstructor(PServiceWorkerManagerChild* actor) -> PServiceWorkerManagerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PServiceWorkerManagerChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PServiceWorkerManagerConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PServiceWorkerManagerConstructor", 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 PServiceWorkerManagerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendShutdownServiceWorkerRegistrar() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_ShutdownServiceWorkerRegistrar(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

auto PBackgroundChild::SendPCacheStorageConstructor(
        PCacheStorageChild* actor,
        const Namespace& aNamespace,
        const PrincipalInfo& aPrincipalInfo) -> PCacheStorageChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PCacheStorageChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PCacheStorageConstructor", 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 PCacheStorageChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPMessagePortConstructor(
        const nsID& uuid,
        const nsID& destinationUuid,
        const uint32_t& sequenceId) -> PMessagePortChild*
{
    PMessagePortChild* actor = (this)->AllocPMessagePortChild(uuid, destinationUuid, sequenceId);
    return SendPMessagePortConstructor(std::move(actor), std::move(uuid), std::move(destinationUuid), std::move(sequenceId));
}

auto PBackgroundChild::SendPMessagePortConstructor(
        PMessagePortChild* actor,
        const nsID& uuid,
        const nsID& destinationUuid,
        const uint32_t& sequenceId) -> PMessagePortChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PMessagePortChild actor");
        return nullptr;
    }

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


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

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), uuid);
    // Sentinel = 'uuid'
    ((&(writer__)))->WriteSentinel(74252728);
    IPC::WriteParam((&(writer__)), destinationUuid);
    // Sentinel = 'destinationUuid'
    ((&(writer__)))->WriteSentinel(840435258);
    IPC::WriteParam((&(writer__)), sequenceId);
    // Sentinel = 'sequenceId'
    ((&(writer__)))->WriteSentinel(386204679);


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PMessagePortConstructor", 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 PMessagePortChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendMessagePortForceClose(
        const nsID& uuid,
        const nsID& destinationUuid,
        const uint32_t& sequenceId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_MessagePortForceClose(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), uuid);
    // Sentinel = 'uuid'
    ((&(writer__)))->WriteSentinel(74252728);
    IPC::WriteParam((&(writer__)), destinationUuid);
    // Sentinel = 'destinationUuid'
    ((&(writer__)))->WriteSentinel(840435258);
    IPC::WriteParam((&(writer__)), sequenceId);
    // Sentinel = 'sequenceId'
    ((&(writer__)))->WriteSentinel(386204679);


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

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

auto PBackgroundChild::SendPQuotaConstructor(PQuotaChild* actor) -> PQuotaChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PQuotaChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PQuotaConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PQuotaConstructor", 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 PQuotaChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendShutdownQuotaManager() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_ShutdownQuotaManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

auto PBackgroundChild::SendShutdownBackgroundSessionStorageManagers() -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_ShutdownBackgroundSessionStorageManagers(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

auto PBackgroundChild::SendPropagateBackgroundSessionStorageManager(
        const uint64_t& currentTopContextId,
        const uint64_t& targetTopContextId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PropagateBackgroundSessionStorageManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), currentTopContextId);
    // Sentinel = 'currentTopContextId'
    ((&(writer__)))->WriteSentinel(1324877769);
    IPC::WriteParam((&(writer__)), targetTopContextId);
    // Sentinel = 'targetTopContextId'
    ((&(writer__)))->WriteSentinel(1175127885);


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

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

auto PBackgroundChild::SendRemoveBackgroundSessionStorageManager(const uint64_t& topContextId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_RemoveBackgroundSessionStorageManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBackgroundChild::SendGetSessionStorageManagerData(
        const uint64_t& aTopContextId,
        const uint32_t& aSizeLimit,
        const bool& aCancelSessionStoreTimer,
        mozilla::ipc::ResolveCallback<nsTArray<SSCacheCopy>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_GetSessionStorageManagerData(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTopContextId);
    // Sentinel = 'aTopContextId'
    ((&(writer__)))->WriteSentinel(600245543);
    IPC::WriteParam((&(writer__)), aSizeLimit);
    // Sentinel = 'aSizeLimit'
    ((&(writer__)))->WriteSentinel(359138300);
    IPC::WriteParam((&(writer__)), aCancelSessionStoreTimer);
    // Sentinel = 'aCancelSessionStoreTimer'
    ((&(writer__)))->WriteSentinel(1972504986);


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

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

            }
            auto& aCacheCopy = *maybe__aCacheCopy;
            // Sentinel = 'aCacheCopy'
            if ((!((aReader)->ReadSentinel(336004049)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'SSCacheCopy[]'");
                return MsgValueError;
            }


            aReader->EndRead();

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

auto PBackgroundChild::SendGetSessionStorageManagerData(
        const uint64_t& aTopContextId,
        const uint32_t& aSizeLimit,
        const bool& aCancelSessionStoreTimer) -> RefPtr<GetSessionStorageManagerDataPromise>
{
    RefPtr<MozPromise<nsTArray<SSCacheCopy>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<nsTArray<SSCacheCopy>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetSessionStorageManagerData(std::move(aTopContextId), std::move(aSizeLimit), std::move(aCancelSessionStoreTimer), [promise__](nsTArray<SSCacheCopy>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::SendLoadSessionStorageManagerData(
        const uint64_t& aTopContextId,
        mozilla::Span<SSCacheCopy const> aOriginCacheCopy) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_LoadSessionStorageManagerData(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTopContextId);
    // Sentinel = 'aTopContextId'
    ((&(writer__)))->WriteSentinel(600245543);
    IPC::WriteParam((&(writer__)), aOriginCacheCopy);
    // Sentinel = 'aOriginCacheCopy'
    ((&(writer__)))->WriteSentinel(875038265);


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

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

auto PBackgroundChild::SendPFileSystemRequestConstructor(
        PFileSystemRequestChild* actor,
        const FileSystemParams& params) -> PFileSystemRequestChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PFileSystemRequestChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PFileSystemRequestConstructor", 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 PFileSystemRequestChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPGamepadEventChannelConstructor(PGamepadEventChannelChild* actor) -> PGamepadEventChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PGamepadEventChannelChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PGamepadEventChannelConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PGamepadEventChannelConstructor", 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 PGamepadEventChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPGamepadTestChannelConstructor(PGamepadTestChannelChild* actor) -> PGamepadTestChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PGamepadTestChannelChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PGamepadTestChannelConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PGamepadTestChannelConstructor", 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 PGamepadTestChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPHttpBackgroundChannelConstructor(
        PHttpBackgroundChannelChild* actor,
        const uint64_t& channelId) -> PHttpBackgroundChannelChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PHttpBackgroundChannelChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PHttpBackgroundChannelConstructor", 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 PHttpBackgroundChannelChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPSharedWorkerConstructor(
        const RemoteWorkerData& data,
        const uint64_t& windowID,
        const MessagePortIdentifier& portIdentifier) -> PSharedWorkerChild*
{
    PSharedWorkerChild* actor = (this)->AllocPSharedWorkerChild(data, windowID, portIdentifier);
    return SendPSharedWorkerConstructor(std::move(actor), std::move(data), std::move(windowID), std::move(portIdentifier));
}

auto PBackgroundChild::SendPSharedWorkerConstructor(
        PSharedWorkerChild* actor,
        const RemoteWorkerData& data,
        const uint64_t& windowID,
        const MessagePortIdentifier& portIdentifier) -> PSharedWorkerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PSharedWorkerChild actor");
        return nullptr;
    }

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


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

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), data);
    // Sentinel = 'data'
    ((&(writer__)))->WriteSentinel(67109275);
    IPC::WriteParam((&(writer__)), windowID);
    // Sentinel = 'windowID'
    ((&(writer__)))->WriteSentinel(253625126);
    IPC::WriteParam((&(writer__)), portIdentifier);
    // Sentinel = 'portIdentifier'
    ((&(writer__)))->WriteSentinel(729875913);


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PSharedWorkerConstructor", 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 PSharedWorkerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPTemporaryIPCBlobConstructor() -> PTemporaryIPCBlobChild*
{
    PTemporaryIPCBlobChild* actor = (this)->AllocPTemporaryIPCBlobChild();
    return SendPTemporaryIPCBlobConstructor(std::move(actor));
}

auto PBackgroundChild::SendPTemporaryIPCBlobConstructor(PTemporaryIPCBlobChild* actor) -> PTemporaryIPCBlobChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PTemporaryIPCBlobChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PTemporaryIPCBlobConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PTemporaryIPCBlobConstructor", 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 PTemporaryIPCBlobChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPFileCreatorConstructor(
        const nsAString& aFullPath,
        const nsAString& aType,
        const nsAString& aName,
        const mozilla::Maybe<int64_t>& lastModified,
        const bool& aExistenceCheck,
        const bool& aIsFromNsIFile) -> PFileCreatorChild*
{
    PFileCreatorChild* actor = (this)->AllocPFileCreatorChild(aFullPath, aType, aName, lastModified, aExistenceCheck, aIsFromNsIFile);
    return SendPFileCreatorConstructor(std::move(actor), std::move(aFullPath), std::move(aType), std::move(aName), std::move(lastModified), std::move(aExistenceCheck), std::move(aIsFromNsIFile));
}

auto PBackgroundChild::SendPFileCreatorConstructor(
        PFileCreatorChild* actor,
        const nsAString& aFullPath,
        const nsAString& aType,
        const nsAString& aName,
        const mozilla::Maybe<int64_t>& lastModified,
        const bool& aExistenceCheck,
        const bool& aIsFromNsIFile) -> PFileCreatorChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PFileCreatorChild actor");
        return nullptr;
    }

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


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

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);
    IPC::WriteParam((&(writer__)), aFullPath);
    // Sentinel = 'aFullPath'
    ((&(writer__)))->WriteSentinel(288097154);
    IPC::WriteParam((&(writer__)), aType);
    // Sentinel = 'aType'
    ((&(writer__)))->WriteSentinel(99222020);
    IPC::WriteParam((&(writer__)), aName);
    // Sentinel = 'aName'
    ((&(writer__)))->WriteSentinel(92537315);
    IPC::WriteParam((&(writer__)), lastModified);
    // Sentinel = 'lastModified'
    ((&(writer__)))->WriteSentinel(531629270);
    IPC::WriteParam((&(writer__)), aExistenceCheck);
    // Sentinel = 'aExistenceCheck'
    ((&(writer__)))->WriteSentinel(794822120);
    IPC::WriteParam((&(writer__)), aIsFromNsIFile);
    // Sentinel = 'aIsFromNsIFile'
    ((&(writer__)))->WriteSentinel(655033660);


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PFileCreatorConstructor", 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 PFileCreatorChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPClientManagerConstructor(PClientManagerChild* actor) -> PClientManagerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PClientManagerChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PClientManagerConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PClientManagerConstructor", 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 PClientManagerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendCreateBoundStorageKeyParent(
        Endpoint<::mozilla::dom::cache::PBoundStorageKeyParent>&& aEndPoint,
        const Namespace& aNamespace,
        const PrincipalInfo& aPrincipalInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateBoundStorageKeyParent(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(aEndPoint));
    // Sentinel = 'aEndPoint'
    ((&(writer__)))->WriteSentinel(281740163);
    IPC::WriteParam((&(writer__)), aNamespace);
    // Sentinel = 'aNamespace'
    ((&(writer__)))->WriteSentinel(356516847);
    IPC::WriteParam((&(writer__)), aPrincipalInfo);
    // Sentinel = 'aPrincipalInfo'
    ((&(writer__)))->WriteSentinel(695272848);


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

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

auto PBackgroundChild::SendCreateMIDIManager(Endpoint<::mozilla::dom::PMIDIManagerParent>&& aEndpoint) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateMIDIManager(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(aEndpoint));
    // Sentinel = 'aEndpoint'
    ((&(writer__)))->WriteSentinel(292225955);


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

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

auto PBackgroundChild::SendCreateMIDIPort(
        Endpoint<::mozilla::dom::PMIDIPortParent>&& aEndpoint,
        const MIDIPortInfo& portInfo,
        const bool& sysexEnabled) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateMIDIPort(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(aEndpoint));
    // Sentinel = 'aEndpoint'
    ((&(writer__)))->WriteSentinel(292225955);
    IPC::WriteParam((&(writer__)), portInfo);
    // Sentinel = 'portInfo'
    ((&(writer__)))->WriteSentinel(254411602);
    IPC::WriteParam((&(writer__)), sysexEnabled);
    // Sentinel = 'sysexEnabled'
    ((&(writer__)))->WriteSentinel(549717224);


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

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

auto PBackgroundChild::SendHasMIDIDevice(
        mozilla::ipc::ResolveCallback<bool>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_HasMIDIDevice(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

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


            aReader->EndRead();

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

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

auto PBackgroundChild::SendCreateMLSTransaction(
        Endpoint<::mozilla::dom::PMLSTransactionParent>&& aEndpoint,
        mozilla::NotNull<nsIPrincipal*> aPrincipal) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_CreateMLSTransaction(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), std::move(aEndpoint));
    // Sentinel = 'aEndpoint'
    ((&(writer__)))->WriteSentinel(292225955);
    IPC::WriteParam((&(writer__)), aPrincipal);
    // Sentinel = 'aPrincipal'
    ((&(writer__)))->WriteSentinel(364381188);


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

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

auto PBackgroundChild::SendStorageActivity(const PrincipalInfo& principalInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_StorageActivity(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

auto PBackgroundChild::SendPServiceWorkerConstructor(
        PServiceWorkerChild* actor,
        const IPCServiceWorkerDescriptor& aDescriptor) -> PServiceWorkerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PServiceWorkerChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PServiceWorkerConstructor", 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 PServiceWorkerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPRemoteWorkerControllerConstructor(
        PRemoteWorkerControllerChild* actor,
        const RemoteWorkerData& aData) -> PRemoteWorkerControllerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PRemoteWorkerControllerChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PRemoteWorkerControllerConstructor", 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 PRemoteWorkerControllerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPServiceWorkerContainerConstructor(PServiceWorkerContainerChild* actor) -> PServiceWorkerContainerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PServiceWorkerContainerChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PServiceWorkerContainerConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PServiceWorkerContainerConstructor", 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 PServiceWorkerContainerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPServiceWorkerRegistrationConstructor(
        PServiceWorkerRegistrationChild* actor,
        const IPCServiceWorkerRegistrationDescriptor& aDescriptor,
        const IPCClientInfo& aForClient) -> PServiceWorkerRegistrationChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PServiceWorkerRegistrationChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PServiceWorkerRegistrationConstructor", 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 PServiceWorkerRegistrationChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPEndpointForReportConstructor(
        const nsAString& aGroupName,
        const PrincipalInfo& aPrincipalInfo) -> PEndpointForReportChild*
{
    PEndpointForReportChild* actor = (this)->AllocPEndpointForReportChild(aGroupName, aPrincipalInfo);
    return SendPEndpointForReportConstructor(std::move(actor), std::move(aGroupName), std::move(aPrincipalInfo));
}

auto PBackgroundChild::SendPEndpointForReportConstructor(
        PEndpointForReportChild* actor,
        const nsAString& aGroupName,
        const PrincipalInfo& aPrincipalInfo) -> PEndpointForReportChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PEndpointForReportChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PEndpointForReportConstructor", 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 PEndpointForReportChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendRemoveEndpoint(
        const nsAString& aGroupName,
        const nsACString& aEndpointURL,
        const PrincipalInfo& aPrincipalInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_RemoveEndpoint(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aGroupName);
    // Sentinel = 'aGroupName'
    ((&(writer__)))->WriteSentinel(359924720);
    IPC::WriteParam((&(writer__)), aEndpointURL);
    // Sentinel = 'aEndpointURL'
    ((&(writer__)))->WriteSentinel(507708566);
    IPC::WriteParam((&(writer__)), aPrincipalInfo);
    // Sentinel = 'aPrincipalInfo'
    ((&(writer__)))->WriteSentinel(695272848);


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

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

auto PBackgroundChild::SendPIdleSchedulerConstructor(PIdleSchedulerChild* actor) -> PIdleSchedulerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PIdleSchedulerChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PIdleSchedulerConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PIdleSchedulerConstructor", 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 PIdleSchedulerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendEnsureRDDProcessAndCreateBridge(
        mozilla::ipc::ResolveCallback<std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_EnsureRDDProcessAndCreateBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



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

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

            }
            auto& rv = *maybe__rv;
            // Sentinel = 'rv'
            if ((!((aReader)->ReadSentinel(22806761)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::PRemoteMediaManagerChild>>(aReader);
            if (!maybe__aEndpoint) {
                (aReader)->FatalError("Error deserializing 'Endpoint<::mozilla::PRemoteMediaManagerChild>'");
                return MsgValueError;

            }
            auto& aEndpoint = *maybe__aEndpoint;
            // Sentinel = 'aEndpoint'
            if ((!((aReader)->ReadSentinel(292225955)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::PRemoteMediaManagerChild>'");
                return MsgValueError;
            }


            aReader->EndRead();

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

auto PBackgroundChild::SendEnsureRDDProcessAndCreateBridge() -> RefPtr<EnsureRDDProcessAndCreateBridgePromise>
{
    RefPtr<MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendEnsureRDDProcessAndCreateBridge([promise__](std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::SendEnsureUtilityProcessAndCreateBridge(
        const RemoteMediaIn& aLocation,
        mozilla::ipc::ResolveCallback<std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_EnsureUtilityProcessAndCreateBridge(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

            }
            auto& rv = *maybe__rv;
            // Sentinel = 'rv'
            if ((!((aReader)->ReadSentinel(22806761)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }
            auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::PRemoteMediaManagerChild>>(aReader);
            if (!maybe__aEndpoint) {
                (aReader)->FatalError("Error deserializing 'Endpoint<::mozilla::PRemoteMediaManagerChild>'");
                return MsgValueError;

            }
            auto& aEndpoint = *maybe__aEndpoint;
            // Sentinel = 'aEndpoint'
            if ((!((aReader)->ReadSentinel(292225955)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::PRemoteMediaManagerChild>'");
                return MsgValueError;
            }


            aReader->EndRead();

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

auto PBackgroundChild::SendEnsureUtilityProcessAndCreateBridge(const RemoteMediaIn& aLocation) -> RefPtr<EnsureUtilityProcessAndCreateBridgePromise>
{
    RefPtr<MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendEnsureUtilityProcessAndCreateBridge(std::move(aLocation), [promise__](std::tuple<nsresult, Endpoint<::mozilla::PRemoteMediaManagerChild>>&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::SendPLockManagerConstructor(
        PLockManagerChild* actor,
        mozilla::NotNull<nsIPrincipal*> aPrincipalInfo,
        const mozilla::Maybe<nsID>& aClientId) -> PLockManagerChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PLockManagerChild actor");
        return nullptr;
    }

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


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

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


    // 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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PLockManagerConstructor", 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 PLockManagerChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendPFetchConstructor(PFetchChild* actor) -> PFetchChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PFetchChild actor");
        return nullptr;
    }

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


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_PFetchConstructor(MSG_ROUTING_CONTROL);
    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("PBackground", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PBackgroundChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PBackground::Msg_PFetchConstructor", 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 PFetchChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PBackgroundChild::SendRequestCameraAccess(
        const bool& aAllowPermissionRequest,
        mozilla::ipc::ResolveCallback<CamerasAccessStatus>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PBackground::Msg_RequestCameraAccess(MSG_ROUTING_CONTROL);
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

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


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

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

            }
            auto& rv = *maybe__rv;
            // Sentinel = 'rv'
            if ((!((aReader)->ReadSentinel(22806761)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'CamerasAccessStatus'");
                return MsgValueError;
            }


            aReader->EndRead();

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

auto PBackgroundChild::SendRequestCameraAccess(const bool& aAllowPermissionRequest) -> RefPtr<RequestCameraAccessPromise>
{
    RefPtr<MozPromise<CamerasAccessStatus, ResponseRejectReason, true>::Private> promise__ = new MozPromise<CamerasAccessStatus, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendRequestCameraAccess(std::move(aAllowPermissionRequest), [promise__](CamerasAccessStatus&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PBackgroundChild::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    switch (aProtocolId) {
    case PBackgroundIndexedDBUtilsMsgStart:
        this->DeallocPBackgroundIndexedDBUtilsChild(static_cast<PBackgroundIndexedDBUtilsChild*>(aListener));
        return;
    case PBackgroundLSObserverMsgStart:
        this->DeallocPBackgroundLSObserverChild(static_cast<PBackgroundLSObserverChild*>(aListener));
        return;
    case PBackgroundLSRequestMsgStart:
        this->DeallocPBackgroundLSRequestChild(static_cast<PBackgroundLSRequestChild*>(aListener));
        return;
    case PBackgroundLSSimpleRequestMsgStart:
        this->DeallocPBackgroundLSSimpleRequestChild(static_cast<PBackgroundLSSimpleRequestChild*>(aListener));
        return;
    case PBackgroundLocalStorageCacheMsgStart:
        this->DeallocPBackgroundLocalStorageCacheChild(static_cast<PBackgroundLocalStorageCacheChild*>(aListener));
        return;
    case PBackgroundStorageMsgStart:
        this->DeallocPBackgroundStorageChild(static_cast<PBackgroundStorageChild*>(aListener));
        return;
    case PBackgroundTestMsgStart:
        this->DeallocPBackgroundTestChild(static_cast<PBackgroundTestChild*>(aListener));
        return;
    case PBroadcastChannelMsgStart:
        this->DeallocPBroadcastChannelChild(static_cast<PBroadcastChannelChild*>(aListener));
        return;
    case PCookieStoreMsgStart:
        this->DeallocPCookieStoreChild(static_cast<PCookieStoreChild*>(aListener));
        return;
    case PEndpointForReportMsgStart:
        this->DeallocPEndpointForReportChild(static_cast<PEndpointForReportChild*>(aListener));
        return;
    case PSharedWorkerMsgStart:
        this->DeallocPSharedWorkerChild(static_cast<PSharedWorkerChild*>(aListener));
        return;
    case PTemporaryIPCBlobMsgStart:
        this->DeallocPTemporaryIPCBlobChild(static_cast<PTemporaryIPCBlobChild*>(aListener));
        return;
    case PFileCreatorMsgStart:
        this->DeallocPFileCreatorChild(static_cast<PFileCreatorChild*>(aListener));
        return;
    case PMessagePortMsgStart:
        this->DeallocPMessagePortChild(static_cast<PMessagePortChild*>(aListener));
        return;
    case PCamerasMsgStart:
        this->DeallocPCamerasChild(static_cast<PCamerasChild*>(aListener));
        return;
    case PServiceWorkerManagerMsgStart:
        this->DeallocPServiceWorkerManagerChild(static_cast<PServiceWorkerManagerChild*>(aListener));
        return;
    case PUDPSocketMsgStart:
        this->DeallocPUDPSocketChild(static_cast<PUDPSocketChild*>(aListener));
        return;
    default:
        FatalError("unreached");
        return;
    }
}

auto PBackgroundChild::OnMessageReceived(const Message& msg__) -> PBackgroundChild::Result
{
    IPC::Message::routeid_t route__ = msg__.routing_id();
    if (MSG_ROUTING_CONTROL != route__) {
        IProtocol* routed__ = Lookup(route__);
        if (!routed__ || !routed__->GetLifecycleProxy()) {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Ignored message for dead actor",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eSending);
            }
            return MsgProcessed;

        }

        RefPtr<mozilla::ipc::ActorLifecycleProxy> proxy__ =
            routed__->GetLifecycleProxy();
        return proxy__->Get()->OnMessageReceived(msg__);
    }

    switch (msg__.type()) {
    case PBackground::Reply_PBackgroundTestConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundIDBFactoryConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundIndexedDBUtilsConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundSDBConnectionConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundLSObserverConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundLSRequestConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundLSSimpleRequestConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundLocalStorageCacheConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundSessionStorageManagerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundSessionStorageServiceConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBackgroundStorageConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_CreateFileSystemManagerParent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PBackground::Msg_CreateFileSystemManagerParent", OTHER);


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

            AUTO_PROFILER_LABEL("PBackground::Msg_CreateWebTransportParent", OTHER);


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

            AUTO_PROFILER_LABEL("PBackground::Msg_CreateNotificationParent", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PBackground::Reply_PVsyncConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PCamerasConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PUDPSocketConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PBroadcastChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PCookieStoreConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PServiceWorkerManagerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PCacheStorageConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PMessagePortConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PQuotaConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_GetSessionStorageManagerData__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PBackground::Msg_GetSessionStorageManagerData", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PBackground::Reply_PFileSystemRequestConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PGamepadEventChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PGamepadTestChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PHttpBackgroundChannelConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PSharedWorkerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PTemporaryIPCBlobConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PFileCreatorConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PClientManagerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_HasMIDIDevice__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PBackground::Msg_HasMIDIDevice", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PBackground::Reply_PServiceWorkerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PRemoteWorkerControllerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PServiceWorkerContainerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PServiceWorkerRegistrationConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PEndpointForReportConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PIdleSchedulerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_EnsureRDDProcessAndCreateBridge__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PBackground::Msg_EnsureRDDProcessAndCreateBridge", OTHER);


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

            AUTO_PROFILER_LABEL("PBackground::Msg_EnsureUtilityProcessAndCreateBridge", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PBackground::Reply_PLockManagerConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_PFetchConstructor__ID:
        {
            return MsgProcessed;
        }
    case PBackground::Reply_RequestCameraAccess__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PBackground::Msg_RequestCameraAccess", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PBackground::Msg_PCacheConstructor__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackground::Msg_PCacheConstructor", 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();
            RefPtr<PCacheChild> actor = (this)->AllocPCacheChild();
            if (!actor) {
                NS_WARNING("Cannot bind null PCacheChild actor");
                return MsgValueError;
            }

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

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

            return MsgProcessed;
        }
    case PBackground::Msg_PCacheStreamControlConstructor__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PBackground", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PBackgroundChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PBackground::Msg_PCacheStreamControlConstructor", 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();
            RefPtr<PCacheStreamControlChild> actor = (this)->AllocPCacheStreamControlChild();
            if (!actor) {
                NS_WARNING("Cannot bind null PCacheStreamControlChild actor");
                return MsgValueError;
            }

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

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

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    case SHMEM_CREATED_MESSAGE_TYPE:
        {
            if (!ShmemCreated(msg__)) {
                return MsgPayloadError;
            }
            return MsgProcessed;
        }
    case SHMEM_DESTROYED_MESSAGE_TYPE:
        {
            if (!ShmemDestroyed(msg__)) {
                return MsgPayloadError;
            }
            return MsgProcessed;
        }
    }
}

auto PBackgroundChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PBackgroundChild::Result
{
    IPC::Message::routeid_t route__ = msg__.routing_id();
    if (MSG_ROUTING_CONTROL != route__) {
        IProtocol* routed__ = Lookup(route__);
        if (!routed__ || !routed__->GetLifecycleProxy()) {
            return MsgDropped;

        }

        RefPtr<mozilla::ipc::ActorLifecycleProxy> proxy__ =
            routed__->GetLifecycleProxy();
        return proxy__->Get()->OnMessageReceived(msg__, reply__);
    }

    return MsgNotKnown;
}



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

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

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

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

        return {};
    }
    return static_cast<::mozilla::ipc::PBackgroundChild*>(actor);
}

} // namespace IPC
