Copy as Markdown

Other Tools

//
// 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/dom/BindingIPCUtils.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/PBackgroundSessionStorageCache.h"
#include "mozilla/dom/PermissionMessageUtils.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/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/ClassOfService.h"
#include "nsIContentSecurityPolicy.h"
#include "nsID.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/PBackgroundLSDatabaseChild.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/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/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/PRemoteWorkerChild.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/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/dom/PWebAuthnTransactionChild.h"
#include "mozilla/net/PUDPSocketChild.h"
#include "mozilla/dom/PVsyncChild.h"
#include "mozilla/PRemoteDecoderManagerChild.h"
#include "mozilla/dom/PWebTransportChild.h"
#include "mozilla/dom/PFetchChild.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::RecvPRemoteWorkerConstructor(
PRemoteWorkerChild* actor,
const RemoteWorkerData& data) -> 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", PBackgroundMsgStart, 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::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::ManagedPBackgroundLSDatabaseChild(nsTArray<PBackgroundLSDatabaseChild*>& aArr) const -> void
{
mManagedPBackgroundLSDatabaseChild.ToArray(aArr);
}
auto PBackgroundChild::ManagedPBackgroundLSDatabaseChild() const -> const ManagedContainer<PBackgroundLSDatabaseChild>&
{
return mManagedPBackgroundLSDatabaseChild;
}
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::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::ManagedPRemoteWorkerChild(nsTArray<PRemoteWorkerChild*>& aArr) const -> void
{
mManagedPRemoteWorkerChild.ToArray(aArr);
}
auto PBackgroundChild::ManagedPRemoteWorkerChild() const -> const ManagedContainer<PRemoteWorkerChild>&
{
return mManagedPRemoteWorkerChild;
}
auto PBackgroundChild::ManagedPRemoteWorkerControllerChild(nsTArray<PRemoteWorkerControllerChild*>& aArr) const -> void
{
mManagedPRemoteWorkerControllerChild.ToArray(aArr);
}
auto PBackgroundChild::ManagedPRemoteWorkerControllerChild() const -> const ManagedContainer<PRemoteWorkerControllerChild>&
{
return mManagedPRemoteWorkerControllerChild;
}
auto PBackgroundChild::ManagedPRemoteWorkerServiceChild(nsTArray<PRemoteWorkerServiceChild*>& aArr) const -> void
{
mManagedPRemoteWorkerServiceChild.ToArray(aArr);
}
auto PBackgroundChild::ManagedPRemoteWorkerServiceChild() const -> const ManagedContainer<PRemoteWorkerServiceChild>&
{
return mManagedPRemoteWorkerServiceChild;
}
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::ManagedPWebAuthnTransactionChild(nsTArray<PWebAuthnTransactionChild*>& aArr) const -> void
{
mManagedPWebAuthnTransactionChild.ToArray(aArr);
}
auto PBackgroundChild::ManagedPWebAuthnTransactionChild() const -> const ManagedContainer<PWebAuthnTransactionChild>&
{
return mManagedPWebAuthnTransactionChild;
}
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::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
total += mManagedPBackgroundIDBFactoryChild.Count();
total += mManagedPBackgroundIndexedDBUtilsChild.Count();
total += mManagedPBackgroundSDBConnectionChild.Count();
total += mManagedPBackgroundLSDatabaseChild.Count();
total += mManagedPBackgroundLSObserverChild.Count();
total += mManagedPBackgroundLSRequestChild.Count();
total += mManagedPBackgroundLSSimpleRequestChild.Count();
total += mManagedPBackgroundLocalStorageCacheChild.Count();
total += mManagedPBackgroundSessionStorageManagerChild.Count();
total += mManagedPBackgroundSessionStorageServiceChild.Count();
total += mManagedPBackgroundStorageChild.Count();
total += mManagedPBackgroundTestChild.Count();
total += mManagedPBroadcastChannelChild.Count();
total += mManagedPCacheChild.Count();
total += mManagedPCacheStorageChild.Count();
total += mManagedPCacheStreamControlChild.Count();
total += mManagedPClientManagerChild.Count();
total += mManagedPEndpointForReportChild.Count();
total += mManagedPFileSystemRequestChild.Count();
total += mManagedPGamepadEventChannelChild.Count();
total += mManagedPGamepadTestChannelChild.Count();
total += mManagedPHttpBackgroundChannelChild.Count();
total += mManagedPIdleSchedulerChild.Count();
total += mManagedPLockManagerChild.Count();
total += mManagedPRemoteWorkerChild.Count();
total += mManagedPRemoteWorkerControllerChild.Count();
total += mManagedPRemoteWorkerServiceChild.Count();
total += mManagedPSharedWorkerChild.Count();
total += mManagedPTemporaryIPCBlobChild.Count();
total += mManagedPFileCreatorChild.Count();
total += mManagedPMessagePortChild.Count();
total += mManagedPCamerasChild.Count();
total += mManagedPQuotaChild.Count();
total += mManagedPServiceWorkerChild.Count();
total += mManagedPServiceWorkerContainerChild.Count();
total += mManagedPServiceWorkerManagerChild.Count();
total += mManagedPServiceWorkerRegistrationChild.Count();
total += mManagedPWebAuthnTransactionChild.Count();
total += mManagedPUDPSocketChild.Count();
total += mManagedPVsyncChild.Count();
total += mManagedPFetchChild.Count();
return total;
}
auto PBackgroundChild::OpenPBackgroundIDBFactoryEndpoint(PBackgroundIDBFactoryChild* aActor) -> ManagedEndpoint<PBackgroundIDBFactoryParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundIDBFactoryChild actor");
return ManagedEndpoint<PBackgroundIDBFactoryParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundIDBFactoryChild.Insert(aActor);
} else {
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, mManagedPBackgroundIDBFactoryChild);
}
auto PBackgroundChild::OpenPBackgroundIndexedDBUtilsEndpoint(PBackgroundIndexedDBUtilsChild* aActor) -> ManagedEndpoint<PBackgroundIndexedDBUtilsParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundIndexedDBUtilsChild actor");
return ManagedEndpoint<PBackgroundIndexedDBUtilsParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundIndexedDBUtilsChild.Insert(aActor);
} else {
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, mManagedPBackgroundIndexedDBUtilsChild);
}
auto PBackgroundChild::OpenPBackgroundSDBConnectionEndpoint(PBackgroundSDBConnectionChild* aActor) -> ManagedEndpoint<PBackgroundSDBConnectionParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundSDBConnectionChild actor");
return ManagedEndpoint<PBackgroundSDBConnectionParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundSDBConnectionChild.Insert(aActor);
} else {
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, mManagedPBackgroundSDBConnectionChild);
}
auto PBackgroundChild::OpenPBackgroundLSDatabaseEndpoint(PBackgroundLSDatabaseChild* aActor) -> ManagedEndpoint<PBackgroundLSDatabaseParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundLSDatabaseChild actor");
return ManagedEndpoint<PBackgroundLSDatabaseParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundLSDatabaseChild.Insert(aActor);
} else {
NS_WARNING("Failed to bind PBackgroundLSDatabaseChild actor");
return ManagedEndpoint<PBackgroundLSDatabaseParent>();
}
// 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<PBackgroundLSDatabaseParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PBackgroundChild::BindPBackgroundLSDatabaseEndpoint(
ManagedEndpoint<PBackgroundLSDatabaseChild> aEndpoint,
PBackgroundLSDatabaseChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this, mManagedPBackgroundLSDatabaseChild);
}
auto PBackgroundChild::OpenPBackgroundLSObserverEndpoint(PBackgroundLSObserverChild* aActor) -> ManagedEndpoint<PBackgroundLSObserverParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundLSObserverChild actor");
return ManagedEndpoint<PBackgroundLSObserverParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundLSObserverChild.Insert(aActor);
} else {
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, mManagedPBackgroundLSObserverChild);
}
auto PBackgroundChild::OpenPBackgroundLSRequestEndpoint(PBackgroundLSRequestChild* aActor) -> ManagedEndpoint<PBackgroundLSRequestParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundLSRequestChild actor");
return ManagedEndpoint<PBackgroundLSRequestParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundLSRequestChild.Insert(aActor);
} else {
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, mManagedPBackgroundLSRequestChild);
}
auto PBackgroundChild::OpenPBackgroundLSSimpleRequestEndpoint(PBackgroundLSSimpleRequestChild* aActor) -> ManagedEndpoint<PBackgroundLSSimpleRequestParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundLSSimpleRequestChild actor");
return ManagedEndpoint<PBackgroundLSSimpleRequestParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundLSSimpleRequestChild.Insert(aActor);
} else {
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, mManagedPBackgroundLSSimpleRequestChild);
}
auto PBackgroundChild::OpenPBackgroundLocalStorageCacheEndpoint(PBackgroundLocalStorageCacheChild* aActor) -> ManagedEndpoint<PBackgroundLocalStorageCacheParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundLocalStorageCacheChild actor");
return ManagedEndpoint<PBackgroundLocalStorageCacheParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundLocalStorageCacheChild.Insert(aActor);
} else {
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, mManagedPBackgroundLocalStorageCacheChild);
}
auto PBackgroundChild::OpenPBackgroundSessionStorageManagerEndpoint(PBackgroundSessionStorageManagerChild* aActor) -> ManagedEndpoint<PBackgroundSessionStorageManagerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundSessionStorageManagerChild actor");
return ManagedEndpoint<PBackgroundSessionStorageManagerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundSessionStorageManagerChild.Insert(aActor);
} else {
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, mManagedPBackgroundSessionStorageManagerChild);
}
auto PBackgroundChild::OpenPBackgroundSessionStorageServiceEndpoint(PBackgroundSessionStorageServiceChild* aActor) -> ManagedEndpoint<PBackgroundSessionStorageServiceParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundSessionStorageServiceChild actor");
return ManagedEndpoint<PBackgroundSessionStorageServiceParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundSessionStorageServiceChild.Insert(aActor);
} else {
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, mManagedPBackgroundSessionStorageServiceChild);
}
auto PBackgroundChild::OpenPBackgroundStorageEndpoint(PBackgroundStorageChild* aActor) -> ManagedEndpoint<PBackgroundStorageParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundStorageChild actor");
return ManagedEndpoint<PBackgroundStorageParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundStorageChild.Insert(aActor);
} else {
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, mManagedPBackgroundStorageChild);
}
auto PBackgroundChild::OpenPBackgroundTestEndpoint(PBackgroundTestChild* aActor) -> ManagedEndpoint<PBackgroundTestParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBackgroundTestChild actor");
return ManagedEndpoint<PBackgroundTestParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBackgroundTestChild.Insert(aActor);
} else {
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, mManagedPBackgroundTestChild);
}
auto PBackgroundChild::OpenPBroadcastChannelEndpoint(PBroadcastChannelChild* aActor) -> ManagedEndpoint<PBroadcastChannelParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PBroadcastChannelChild actor");
return ManagedEndpoint<PBroadcastChannelParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPBroadcastChannelChild.Insert(aActor);
} else {
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, mManagedPBroadcastChannelChild);
}
auto PBackgroundChild::OpenPCacheEndpoint(PCacheChild* aActor) -> ManagedEndpoint<PCacheParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PCacheChild actor");
return ManagedEndpoint<PCacheParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPCacheChild.Insert(aActor);
} else {
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, mManagedPCacheChild);
}
auto PBackgroundChild::OpenPCacheStorageEndpoint(PCacheStorageChild* aActor) -> ManagedEndpoint<PCacheStorageParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PCacheStorageChild actor");
return ManagedEndpoint<PCacheStorageParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPCacheStorageChild.Insert(aActor);
} else {
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, mManagedPCacheStorageChild);
}
auto PBackgroundChild::OpenPCacheStreamControlEndpoint(PCacheStreamControlChild* aActor) -> ManagedEndpoint<PCacheStreamControlParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PCacheStreamControlChild actor");
return ManagedEndpoint<PCacheStreamControlParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPCacheStreamControlChild.Insert(aActor);
} else {
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, mManagedPCacheStreamControlChild);
}
auto PBackgroundChild::OpenPClientManagerEndpoint(PClientManagerChild* aActor) -> ManagedEndpoint<PClientManagerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PClientManagerChild actor");
return ManagedEndpoint<PClientManagerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPClientManagerChild.Insert(aActor);
} else {
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, mManagedPClientManagerChild);
}
auto PBackgroundChild::OpenPEndpointForReportEndpoint(PEndpointForReportChild* aActor) -> ManagedEndpoint<PEndpointForReportParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PEndpointForReportChild actor");
return ManagedEndpoint<PEndpointForReportParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPEndpointForReportChild.Insert(aActor);
} else {
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, mManagedPEndpointForReportChild);
}
auto PBackgroundChild::OpenPFileSystemRequestEndpoint(PFileSystemRequestChild* aActor) -> ManagedEndpoint<PFileSystemRequestParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PFileSystemRequestChild actor");
return ManagedEndpoint<PFileSystemRequestParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPFileSystemRequestChild.Insert(aActor);
} else {
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, mManagedPFileSystemRequestChild);
}
auto PBackgroundChild::OpenPGamepadEventChannelEndpoint(PGamepadEventChannelChild* aActor) -> ManagedEndpoint<PGamepadEventChannelParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PGamepadEventChannelChild actor");
return ManagedEndpoint<PGamepadEventChannelParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPGamepadEventChannelChild.Insert(aActor);
} else {
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, mManagedPGamepadEventChannelChild);
}
auto PBackgroundChild::OpenPGamepadTestChannelEndpoint(PGamepadTestChannelChild* aActor) -> ManagedEndpoint<PGamepadTestChannelParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PGamepadTestChannelChild actor");
return ManagedEndpoint<PGamepadTestChannelParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPGamepadTestChannelChild.Insert(aActor);
} else {
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, mManagedPGamepadTestChannelChild);
}
auto PBackgroundChild::OpenPHttpBackgroundChannelEndpoint(PHttpBackgroundChannelChild* aActor) -> ManagedEndpoint<PHttpBackgroundChannelParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PHttpBackgroundChannelChild actor");
return ManagedEndpoint<PHttpBackgroundChannelParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPHttpBackgroundChannelChild.Insert(aActor);
} else {
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, mManagedPHttpBackgroundChannelChild);
}
auto PBackgroundChild::OpenPIdleSchedulerEndpoint(PIdleSchedulerChild* aActor) -> ManagedEndpoint<PIdleSchedulerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PIdleSchedulerChild actor");
return ManagedEndpoint<PIdleSchedulerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPIdleSchedulerChild.Insert(aActor);
} else {
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, mManagedPIdleSchedulerChild);
}
auto PBackgroundChild::OpenPLockManagerEndpoint(PLockManagerChild* aActor) -> ManagedEndpoint<PLockManagerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PLockManagerChild actor");
return ManagedEndpoint<PLockManagerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPLockManagerChild.Insert(aActor);
} else {
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, mManagedPLockManagerChild);
}
auto PBackgroundChild::OpenPRemoteWorkerEndpoint(PRemoteWorkerChild* aActor) -> ManagedEndpoint<PRemoteWorkerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PRemoteWorkerChild actor");
return ManagedEndpoint<PRemoteWorkerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPRemoteWorkerChild.Insert(aActor);
} else {
NS_WARNING("Failed to bind PRemoteWorkerChild actor");
return ManagedEndpoint<PRemoteWorkerParent>();
}
// 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<PRemoteWorkerParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PBackgroundChild::BindPRemoteWorkerEndpoint(
ManagedEndpoint<PRemoteWorkerChild> aEndpoint,
PRemoteWorkerChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this, mManagedPRemoteWorkerChild);
}
auto PBackgroundChild::OpenPRemoteWorkerControllerEndpoint(PRemoteWorkerControllerChild* aActor) -> ManagedEndpoint<PRemoteWorkerControllerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PRemoteWorkerControllerChild actor");
return ManagedEndpoint<PRemoteWorkerControllerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPRemoteWorkerControllerChild.Insert(aActor);
} else {
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, mManagedPRemoteWorkerControllerChild);
}
auto PBackgroundChild::OpenPRemoteWorkerServiceEndpoint(PRemoteWorkerServiceChild* aActor) -> ManagedEndpoint<PRemoteWorkerServiceParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PRemoteWorkerServiceChild actor");
return ManagedEndpoint<PRemoteWorkerServiceParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPRemoteWorkerServiceChild.Insert(aActor);
} else {
NS_WARNING("Failed to bind PRemoteWorkerServiceChild actor");
return ManagedEndpoint<PRemoteWorkerServiceParent>();
}
// 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<PRemoteWorkerServiceParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PBackgroundChild::BindPRemoteWorkerServiceEndpoint(
ManagedEndpoint<PRemoteWorkerServiceChild> aEndpoint,
PRemoteWorkerServiceChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this, mManagedPRemoteWorkerServiceChild);
}
auto PBackgroundChild::OpenPSharedWorkerEndpoint(PSharedWorkerChild* aActor) -> ManagedEndpoint<PSharedWorkerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PSharedWorkerChild actor");
return ManagedEndpoint<PSharedWorkerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPSharedWorkerChild.Insert(aActor);
} else {
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, mManagedPSharedWorkerChild);
}
auto PBackgroundChild::OpenPTemporaryIPCBlobEndpoint(PTemporaryIPCBlobChild* aActor) -> ManagedEndpoint<PTemporaryIPCBlobParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PTemporaryIPCBlobChild actor");
return ManagedEndpoint<PTemporaryIPCBlobParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPTemporaryIPCBlobChild.Insert(aActor);
} else {
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, mManagedPTemporaryIPCBlobChild);
}
auto PBackgroundChild::OpenPFileCreatorEndpoint(PFileCreatorChild* aActor) -> ManagedEndpoint<PFileCreatorParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PFileCreatorChild actor");
return ManagedEndpoint<PFileCreatorParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPFileCreatorChild.Insert(aActor);
} else {
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, mManagedPFileCreatorChild);
}
auto PBackgroundChild::OpenPMessagePortEndpoint(PMessagePortChild* aActor) -> ManagedEndpoint<PMessagePortParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PMessagePortChild actor");
return ManagedEndpoint<PMessagePortParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPMessagePortChild.Insert(aActor);
} else {
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, mManagedPMessagePortChild);
}
auto PBackgroundChild::OpenPCamerasEndpoint(PCamerasChild* aActor) -> ManagedEndpoint<PCamerasParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PCamerasChild actor");
return ManagedEndpoint<PCamerasParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPCamerasChild.Insert(aActor);
} else {
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, mManagedPCamerasChild);
}
auto PBackgroundChild::OpenPQuotaEndpoint(PQuotaChild* aActor) -> ManagedEndpoint<PQuotaParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PQuotaChild actor");
return ManagedEndpoint<PQuotaParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPQuotaChild.Insert(aActor);
} else {
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, mManagedPQuotaChild);
}
auto PBackgroundChild::OpenPServiceWorkerEndpoint(PServiceWorkerChild* aActor) -> ManagedEndpoint<PServiceWorkerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PServiceWorkerChild actor");
return ManagedEndpoint<PServiceWorkerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPServiceWorkerChild.Insert(aActor);
} else {
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, mManagedPServiceWorkerChild);
}
auto PBackgroundChild::OpenPServiceWorkerContainerEndpoint(PServiceWorkerContainerChild* aActor) -> ManagedEndpoint<PServiceWorkerContainerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PServiceWorkerContainerChild actor");
return ManagedEndpoint<PServiceWorkerContainerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPServiceWorkerContainerChild.Insert(aActor);
} else {
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, mManagedPServiceWorkerContainerChild);
}
auto PBackgroundChild::OpenPServiceWorkerManagerEndpoint(PServiceWorkerManagerChild* aActor) -> ManagedEndpoint<PServiceWorkerManagerParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PServiceWorkerManagerChild actor");
return ManagedEndpoint<PServiceWorkerManagerParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPServiceWorkerManagerChild.Insert(aActor);
} else {
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, mManagedPServiceWorkerManagerChild);
}
auto PBackgroundChild::OpenPServiceWorkerRegistrationEndpoint(PServiceWorkerRegistrationChild* aActor) -> ManagedEndpoint<PServiceWorkerRegistrationParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PServiceWorkerRegistrationChild actor");
return ManagedEndpoint<PServiceWorkerRegistrationParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPServiceWorkerRegistrationChild.Insert(aActor);
} else {
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, mManagedPServiceWorkerRegistrationChild);
}
auto PBackgroundChild::OpenPWebAuthnTransactionEndpoint(PWebAuthnTransactionChild* aActor) -> ManagedEndpoint<PWebAuthnTransactionParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PWebAuthnTransactionChild actor");
return ManagedEndpoint<PWebAuthnTransactionParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPWebAuthnTransactionChild.Insert(aActor);
} else {
NS_WARNING("Failed to bind PWebAuthnTransactionChild actor");
return ManagedEndpoint<PWebAuthnTransactionParent>();
}
// 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<PWebAuthnTransactionParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PBackgroundChild::BindPWebAuthnTransactionEndpoint(
ManagedEndpoint<PWebAuthnTransactionChild> aEndpoint,
PWebAuthnTransactionChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this, mManagedPWebAuthnTransactionChild);
}
auto PBackgroundChild::OpenPUDPSocketEndpoint(PUDPSocketChild* aActor) -> ManagedEndpoint<PUDPSocketParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PUDPSocketChild actor");
return ManagedEndpoint<PUDPSocketParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPUDPSocketChild.Insert(aActor);
} else {
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, mManagedPUDPSocketChild);
}
auto PBackgroundChild::OpenPVsyncEndpoint(PVsyncChild* aActor) -> ManagedEndpoint<PVsyncParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PVsyncChild actor");
return ManagedEndpoint<PVsyncParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPVsyncChild.Insert(aActor);
} else {
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, mManagedPVsyncChild);
}
auto PBackgroundChild::OpenPFetchEndpoint(PFetchChild* aActor) -> ManagedEndpoint<PFetchParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PFetchChild actor");
return ManagedEndpoint<PFetchParent>();
}
if (aActor->SetManagerAndRegister(this)) {
mManagedPFetchChild.Insert(aActor);
} else {
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, mManagedPFetchChild);
}
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)) {
mManagedPBackgroundTestChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundIDBFactoryChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundIndexedDBUtilsChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPBackgroundSDBConnectionChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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::SendPBackgroundLSDatabaseConstructor(
PBackgroundLSDatabaseChild* actor,
const PrincipalInfo& principalInfo,
const uint32_t& privateBrowsingId,
const uint64_t& datastoreId) -> PBackgroundLSDatabaseChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PBackgroundLSDatabaseChild actor");
return nullptr;
}
if (actor->SetManagerAndRegister(this)) {
mManagedPBackgroundLSDatabaseChild.Insert(actor);
} else {
NS_WARNING("Failed to bind PBackgroundLSDatabaseChild actor");
return nullptr;
}
// Build our constructor message.
UniquePtr<IPC::Message> msg__ = PBackground::Msg_PBackgroundLSDatabaseConstructor(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actor);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
IPC::WriteParam((&(writer__)), principalInfo);
// Sentinel = 'principalInfo'
((&(writer__)))->WriteSentinel(633472335);
IPC::WriteParam((&(writer__)), privateBrowsingId);
// Sentinel = 'privateBrowsingId'
((&(writer__)))->WriteSentinel(1071711988);
IPC::WriteParam((&(writer__)), datastoreId);
// Sentinel = 'datastoreId'
((&(writer__)))->WriteSentinel(456262773);
// 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_PBackgroundLSDatabaseConstructor", 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 PBackgroundLSDatabaseChild 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)) {
mManagedPBackgroundLSObserverChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundLSRequestChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundLSSimpleRequestChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundLocalStorageCacheChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundSessionStorageManagerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBackgroundSessionStorageServiceChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPBackgroundStorageChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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);
ChannelSend(std::move(msg__), PBackground::Reply_CreateFileSystemManagerParent__ID, std::move(aResolve), std::move(aReject));
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);
ChannelSend(std::move(msg__), PBackground::Reply_CreateWebTransportParent__ID, std::move(aResolve), std::move(aReject));
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::SendPVsyncConstructor(PVsyncChild* actor) -> PVsyncChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PVsyncChild actor");
return nullptr;
}
if (actor->SetManagerAndRegister(this)) {
mManagedPVsyncChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPCamerasChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPUDPSocketChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPBroadcastChannelChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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::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)) {
mManagedPServiceWorkerManagerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPCacheStorageChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPMessagePortChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPQuotaChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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);
ChannelSend(std::move(msg__), PBackground::Reply_GetSessionStorageManagerData__ID, std::move(aResolve), std::move(aReject));
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)) {
mManagedPFileSystemRequestChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPGamepadEventChannelChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPGamepadTestChannelChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPHttpBackgroundChannelChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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::SendPWebAuthnTransactionConstructor() -> PWebAuthnTransactionChild*
{
PWebAuthnTransactionChild* actor = (this)->AllocPWebAuthnTransactionChild();
return SendPWebAuthnTransactionConstructor(std::move(actor));
}
auto PBackgroundChild::SendPWebAuthnTransactionConstructor(PWebAuthnTransactionChild* actor) -> PWebAuthnTransactionChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PWebAuthnTransactionChild actor");
return nullptr;
}
if (actor->SetManagerAndRegister(this)) {
mManagedPWebAuthnTransactionChild.Insert(actor);
} else {
NS_WARNING("Failed to bind PWebAuthnTransactionChild actor");
return nullptr;
}
// Build our constructor message.
UniquePtr<IPC::Message> msg__ = PBackground::Msg_PWebAuthnTransactionConstructor(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actor);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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_PWebAuthnTransactionConstructor", 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 PWebAuthnTransactionChild 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)) {
mManagedPSharedWorkerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPTemporaryIPCBlobChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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)) {
mManagedPFileCreatorChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPClientManagerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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::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);
ChannelSend(std::move(msg__), PBackground::Reply_HasMIDIDevice__ID, std::move(aResolve), std::move(aReject));
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::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)) {
mManagedPServiceWorkerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPRemoteWorkerControllerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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::SendPRemoteWorkerServiceConstructor(PRemoteWorkerServiceChild* actor) -> PRemoteWorkerServiceChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PRemoteWorkerServiceChild actor");
return nullptr;
}
if (actor->SetManagerAndRegister(this)) {
mManagedPRemoteWorkerServiceChild.Insert(actor);
} else {
NS_WARNING("Failed to bind PRemoteWorkerServiceChild actor");
return nullptr;
}
// Build our constructor message.
UniquePtr<IPC::Message> msg__ = PBackground::Msg_PRemoteWorkerServiceConstructor(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actor);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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_PRemoteWorkerServiceConstructor", 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 PRemoteWorkerServiceChild 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)) {
mManagedPServiceWorkerContainerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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) -> PServiceWorkerRegistrationChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PServiceWorkerRegistrationChild actor");
return nullptr;
}
if (actor->SetManagerAndRegister(this)) {
mManagedPServiceWorkerRegistrationChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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_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)) {
mManagedPEndpointForReportChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPIdleSchedulerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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::PRemoteDecoderManagerChild>>>&& 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);
ChannelSend(std::move(msg__), PBackground::Reply_EnsureRDDProcessAndCreateBridge__ID, std::move(aResolve), std::move(aReject));
return;
}
auto PBackgroundChild::SendEnsureRDDProcessAndCreateBridge() -> RefPtr<EnsureRDDProcessAndCreateBridgePromise>
{
RefPtr<MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendEnsureRDDProcessAndCreateBridge([promise__](std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PBackgroundChild::SendEnsureUtilityProcessAndCreateBridge(
const RemoteDecodeIn& aLocation,
mozilla::ipc::ResolveCallback<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>>&& 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);
ChannelSend(std::move(msg__), PBackground::Reply_EnsureUtilityProcessAndCreateBridge__ID, std::move(aResolve), std::move(aReject));
return;
}
auto PBackgroundChild::SendEnsureUtilityProcessAndCreateBridge(const RemoteDecodeIn& aLocation) -> RefPtr<EnsureUtilityProcessAndCreateBridgePromise>
{
RefPtr<MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendEnsureUtilityProcessAndCreateBridge(std::move(aLocation), [promise__](std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>&& 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 nsID& aClientId) -> PLockManagerChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PLockManagerChild actor");
return nullptr;
}
if (actor->SetManagerAndRegister(this)) {
mManagedPLockManagerChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
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)) {
mManagedPFetchChild.Insert(actor);
} else {
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);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
// 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);
ChannelSend(std::move(msg__), PBackground::Reply_RequestCameraAccess__ID, std::move(aResolve), std::move(aReject));
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::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
switch (aProtocolId) {
case PBackgroundIDBFactoryMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundIDBFactoryChild.EnsureRemoved(static_cast<PBackgroundIDBFactoryChild*>(aListener)));
return;
case PBackgroundIndexedDBUtilsMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundIndexedDBUtilsChild.EnsureRemoved(static_cast<PBackgroundIndexedDBUtilsChild*>(aListener)));
return;
case PBackgroundSDBConnectionMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundSDBConnectionChild.EnsureRemoved(static_cast<PBackgroundSDBConnectionChild*>(aListener)));
return;
case PBackgroundLSDatabaseMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundLSDatabaseChild.EnsureRemoved(static_cast<PBackgroundLSDatabaseChild*>(aListener)));
return;
case PBackgroundLSObserverMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundLSObserverChild.EnsureRemoved(static_cast<PBackgroundLSObserverChild*>(aListener)));
return;
case PBackgroundLSRequestMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundLSRequestChild.EnsureRemoved(static_cast<PBackgroundLSRequestChild*>(aListener)));
return;
case PBackgroundLSSimpleRequestMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundLSSimpleRequestChild.EnsureRemoved(static_cast<PBackgroundLSSimpleRequestChild*>(aListener)));
return;
case PBackgroundLocalStorageCacheMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundLocalStorageCacheChild.EnsureRemoved(static_cast<PBackgroundLocalStorageCacheChild*>(aListener)));
return;
case PBackgroundSessionStorageManagerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundSessionStorageManagerChild.EnsureRemoved(static_cast<PBackgroundSessionStorageManagerChild*>(aListener)));
return;
case PBackgroundSessionStorageServiceMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundSessionStorageServiceChild.EnsureRemoved(static_cast<PBackgroundSessionStorageServiceChild*>(aListener)));
return;
case PBackgroundStorageMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundStorageChild.EnsureRemoved(static_cast<PBackgroundStorageChild*>(aListener)));
return;
case PBackgroundTestMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBackgroundTestChild.EnsureRemoved(static_cast<PBackgroundTestChild*>(aListener)));
return;
case PBroadcastChannelMsgStart:
MOZ_ALWAYS_TRUE(mManagedPBroadcastChannelChild.EnsureRemoved(static_cast<PBroadcastChannelChild*>(aListener)));
return;
case PCacheMsgStart:
MOZ_ALWAYS_TRUE(mManagedPCacheChild.EnsureRemoved(static_cast<PCacheChild*>(aListener)));
return;
case PCacheStorageMsgStart:
MOZ_ALWAYS_TRUE(mManagedPCacheStorageChild.EnsureRemoved(static_cast<PCacheStorageChild*>(aListener)));
return;
case PCacheStreamControlMsgStart:
MOZ_ALWAYS_TRUE(mManagedPCacheStreamControlChild.EnsureRemoved(static_cast<PCacheStreamControlChild*>(aListener)));
return;
case PClientManagerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPClientManagerChild.EnsureRemoved(static_cast<PClientManagerChild*>(aListener)));
return;
case PEndpointForReportMsgStart:
MOZ_ALWAYS_TRUE(mManagedPEndpointForReportChild.EnsureRemoved(static_cast<PEndpointForReportChild*>(aListener)));
return;
case PFileSystemRequestMsgStart:
MOZ_ALWAYS_TRUE(mManagedPFileSystemRequestChild.EnsureRemoved(static_cast<PFileSystemRequestChild*>(aListener)));
return;
case PGamepadEventChannelMsgStart:
MOZ_ALWAYS_TRUE(mManagedPGamepadEventChannelChild.EnsureRemoved(static_cast<PGamepadEventChannelChild*>(aListener)));
return;
case PGamepadTestChannelMsgStart:
MOZ_ALWAYS_TRUE(mManagedPGamepadTestChannelChild.EnsureRemoved(static_cast<PGamepadTestChannelChild*>(aListener)));
return;
case PHttpBackgroundChannelMsgStart:
MOZ_ALWAYS_TRUE(mManagedPHttpBackgroundChannelChild.EnsureRemoved(static_cast<PHttpBackgroundChannelChild*>(aListener)));
return;
case PIdleSchedulerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPIdleSchedulerChild.EnsureRemoved(static_cast<PIdleSchedulerChild*>(aListener)));
return;
case PLockManagerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPLockManagerChild.EnsureRemoved(static_cast<PLockManagerChild*>(aListener)));
return;
case PRemoteWorkerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPRemoteWorkerChild.EnsureRemoved(static_cast<PRemoteWorkerChild*>(aListener)));
return;
case PRemoteWorkerControllerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPRemoteWorkerControllerChild.EnsureRemoved(static_cast<PRemoteWorkerControllerChild*>(aListener)));
return;
case PRemoteWorkerServiceMsgStart:
MOZ_ALWAYS_TRUE(mManagedPRemoteWorkerServiceChild.EnsureRemoved(static_cast<PRemoteWorkerServiceChild*>(aListener)));
return;
case PSharedWorkerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPSharedWorkerChild.EnsureRemoved(static_cast<PSharedWorkerChild*>(aListener)));
return;
case PTemporaryIPCBlobMsgStart:
MOZ_ALWAYS_TRUE(mManagedPTemporaryIPCBlobChild.EnsureRemoved(static_cast<PTemporaryIPCBlobChild*>(aListener)));
return;
case PFileCreatorMsgStart:
MOZ_ALWAYS_TRUE(mManagedPFileCreatorChild.EnsureRemoved(static_cast<PFileCreatorChild*>(aListener)));
return;
case PMessagePortMsgStart:
MOZ_ALWAYS_TRUE(mManagedPMessagePortChild.EnsureRemoved(static_cast<PMessagePortChild*>(aListener)));
return;
case PCamerasMsgStart:
MOZ_ALWAYS_TRUE(mManagedPCamerasChild.EnsureRemoved(static_cast<PCamerasChild*>(aListener)));
return;
case PQuotaMsgStart:
MOZ_ALWAYS_TRUE(mManagedPQuotaChild.EnsureRemoved(static_cast<PQuotaChild*>(aListener)));
return;
case PServiceWorkerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPServiceWorkerChild.EnsureRemoved(static_cast<PServiceWorkerChild*>(aListener)));
return;
case PServiceWorkerContainerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPServiceWorkerContainerChild.EnsureRemoved(static_cast<PServiceWorkerContainerChild*>(aListener)));
return;
case PServiceWorkerManagerMsgStart:
MOZ_ALWAYS_TRUE(mManagedPServiceWorkerManagerChild.EnsureRemoved(static_cast<PServiceWorkerManagerChild*>(aListener)));
return;
case PServiceWorkerRegistrationMsgStart:
MOZ_ALWAYS_TRUE(mManagedPServiceWorkerRegistrationChild.EnsureRemoved(static_cast<PServiceWorkerRegistrationChild*>(aListener)));
return;
case PWebAuthnTransactionMsgStart:
MOZ_ALWAYS_TRUE(mManagedPWebAuthnTransactionChild.EnsureRemoved(static_cast<PWebAuthnTransactionChild*>(aListener)));
return;
case PUDPSocketMsgStart:
MOZ_ALWAYS_TRUE(mManagedPUDPSocketChild.EnsureRemoved(static_cast<PUDPSocketChild*>(aListener)));
return;
case PVsyncMsgStart:
MOZ_ALWAYS_TRUE(mManagedPVsyncChild.EnsureRemoved(static_cast<PVsyncChild*>(aListener)));
return;
case PFetchMsgStart:
MOZ_ALWAYS_TRUE(mManagedPFetchChild.EnsureRemoved(static_cast<PFetchChild*>(aListener)));
return;
default:
FatalError("unreached");
return; }
}
auto PBackgroundChild::DeallocManagee(
int32_t 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 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 PWebAuthnTransactionMsgStart:
this->DeallocPWebAuthnTransactionChild(static_cast<PWebAuthnTransactionChild*>(aListener));
return;
case PUDPSocketMsgStart:
this->DeallocPUDPSocketChild(static_cast<PUDPSocketChild*>(aListener));
return;
default:
FatalError("unreached");
return;
}
}
auto PBackgroundChild::OnMessageReceived(const Message& msg__) -> PBackgroundChild::Result
{
int32_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_PBackgroundLSDatabaseConstructor__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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<nsresult> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__rv = IPC::ReadParam<nsresult>((&(reader__)));
if (!maybe__rv) {
FatalError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto& rv = *maybe__rv;
// Sentinel = 'rv'
if ((!(((&(reader__)))->ReadSentinel(22806761)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(rv));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<std::tuple<nsresult, uint8_t>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__rv = IPC::ReadParam<nsresult>((&(reader__)));
if (!maybe__rv) {
FatalError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto& rv = *maybe__rv;
// Sentinel = 'rv'
if ((!(((&(reader__)))->ReadSentinel(22806761)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto maybe__aReliability = IPC::ReadParam<uint8_t>((&(reader__)));
if (!maybe__aReliability) {
FatalError("Error deserializing 'uint8_t'");
return MsgValueError;
}
auto& aReliability = *maybe__aReliability;
// Sentinel = 'aReliability'
if ((!(((&(reader__)))->ReadSentinel(510657756)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::make_tuple(std::move(rv), std::move(aReliability)));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
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_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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<nsTArray<SSCacheCopy>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__aCacheCopy = IPC::ReadParam<nsTArray<SSCacheCopy>>((&(reader__)));
if (!maybe__aCacheCopy) {
FatalError("Error deserializing 'SSCacheCopy[]'");
return MsgValueError;
}
auto& aCacheCopy = *maybe__aCacheCopy;
// Sentinel = 'aCacheCopy'
if ((!(((&(reader__)))->ReadSentinel(336004049)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'SSCacheCopy[]'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(aCacheCopy));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
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_PWebAuthnTransactionConstructor__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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<bool> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__hasDevice = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__hasDevice) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& hasDevice = *maybe__hasDevice;
// Sentinel = 'hasDevice'
if ((!(((&(reader__)))->ReadSentinel(296551309)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(hasDevice));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
case PBackground::Reply_PServiceWorkerConstructor__ID:
{
return MsgProcessed;
}
case PBackground::Reply_PRemoteWorkerControllerConstructor__ID:
{
return MsgProcessed;
}
case PBackground::Reply_PRemoteWorkerServiceConstructor__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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__rv = IPC::ReadParam<nsresult>((&(reader__)));
if (!maybe__rv) {
FatalError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto& rv = *maybe__rv;
// Sentinel = 'rv'
if ((!(((&(reader__)))->ReadSentinel(22806761)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::PRemoteDecoderManagerChild>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::PRemoteDecoderManagerChild>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::PRemoteDecoderManagerChild>'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::make_tuple(std::move(rv), std::move(aEndpoint)));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<std::tuple<nsresult, Endpoint<::mozilla::PRemoteDecoderManagerChild>>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__rv = IPC::ReadParam<nsresult>((&(reader__)));
if (!maybe__rv) {
FatalError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto& rv = *maybe__rv;
// Sentinel = 'rv'
if ((!(((&(reader__)))->ReadSentinel(22806761)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
return MsgValueError;
}
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::PRemoteDecoderManagerChild>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::PRemoteDecoderManagerChild>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::PRemoteDecoderManagerChild>'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::make_tuple(std::move(rv), std::move(aEndpoint)));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
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);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<CamerasAccessStatus> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__rv = IPC::ReadParam<CamerasAccessStatus>((&(reader__)));
if (!maybe__rv) {
FatalError("Error deserializing 'CamerasAccessStatus'");
return MsgValueError;
}
auto& rv = *maybe__rv;
// Sentinel = 'rv'
if ((!(((&(reader__)))->ReadSentinel(22806761)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'CamerasAccessStatus'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(rv));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
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__handle__ = IPC::ReadParam<ActorHandle>((&(reader__)));
if (!maybe__handle__) {
FatalError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
auto& handle__ = *maybe__handle__;
// Sentinel = 'actor'
if ((!(((&(reader__)))->ReadSentinel(102892058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
reader__.EndRead();
RefPtr<PCacheChild> actor = (this)->AllocPCacheChild();
if (!actor) {
NS_WARNING("Cannot bind null PCacheChild actor");
return MsgValueError;
}
if (actor->SetManagerAndRegister(this, (handle__).mId)) {
mManagedPCacheChild.Insert(actor);
} else {
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__handle__ = IPC::ReadParam<ActorHandle>((&(reader__)));
if (!maybe__handle__) {
FatalError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
auto& handle__ = *maybe__handle__;
// Sentinel = 'actor'
if ((!(((&(reader__)))->ReadSentinel(102892058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
reader__.EndRead();
RefPtr<PCacheStreamControlChild> actor = (this)->AllocPCacheStreamControlChild();
if (!actor) {
NS_WARNING("Cannot bind null PCacheStreamControlChild actor");
return MsgValueError;
}
if (actor->SetManagerAndRegister(this, (handle__).mId)) {
mManagedPCacheStreamControlChild.Insert(actor);
} else {
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;
}
case PBackground::Msg_PRemoteWorkerConstructor__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_PRemoteWorkerConstructor", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__handle__ = IPC::ReadParam<ActorHandle>((&(reader__)));
if (!maybe__handle__) {
FatalError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
auto& handle__ = *maybe__handle__;
// Sentinel = 'actor'
if ((!(((&(reader__)))->ReadSentinel(102892058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
auto maybe__data = IPC::ReadParam<RemoteWorkerData>((&(reader__)));
if (!maybe__data) {
FatalError("Error deserializing 'RemoteWorkerData'");
return MsgValueError;
}
auto& data = *maybe__data;
// Sentinel = 'data'
if ((!(((&(reader__)))->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'RemoteWorkerData'");
return MsgValueError;
}
reader__.EndRead();
RefPtr<PRemoteWorkerChild> actor = (this)->AllocPRemoteWorkerChild(data);
if (!actor) {
NS_WARNING("Cannot bind null PRemoteWorkerChild actor");
return MsgValueError;
}
if (actor->SetManagerAndRegister(this, (handle__).mId)) {
mManagedPRemoteWorkerChild.Insert(actor);
} else {
NS_WARNING("Failed to bind PRemoteWorkerChild actor");
return MsgValueError;
}
mozilla::ipc::IPCResult __ok = (this)->RecvPRemoteWorkerConstructor(actor, std::move(data));
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
{
int32_t route__ = msg__.routing_id();
if (MSG_ROUTING_CONTROL != route__) {
IProtocol* routed__ = Lookup(route__);
if (!routed__ || !routed__->GetLifecycleProxy()) {
return MsgRouteError;
}
RefPtr<mozilla::ipc::ActorLifecycleProxy> proxy__ =
routed__->GetLifecycleProxy();
return proxy__->Get()->OnMessageReceived(msg__, reply__);
}
return MsgNotKnown;
}
auto PBackgroundChild::DoomSubtree() -> void
{
for (auto* key : mManagedPBackgroundIDBFactoryChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundIndexedDBUtilsChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundSDBConnectionChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundLSDatabaseChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundLSObserverChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundLSRequestChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundLSSimpleRequestChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundLocalStorageCacheChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundSessionStorageManagerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundSessionStorageServiceChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundStorageChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBackgroundTestChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPBroadcastChannelChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPCacheChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPCacheStorageChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPCacheStreamControlChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPClientManagerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPEndpointForReportChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPFileSystemRequestChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPGamepadEventChannelChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPGamepadTestChannelChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPHttpBackgroundChannelChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPIdleSchedulerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPLockManagerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPRemoteWorkerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPRemoteWorkerControllerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPRemoteWorkerServiceChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPSharedWorkerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPTemporaryIPCBlobChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPFileCreatorChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPMessagePortChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPCamerasChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPQuotaChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPServiceWorkerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPServiceWorkerContainerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPServiceWorkerManagerChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPServiceWorkerRegistrationChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPWebAuthnTransactionChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPUDPSocketChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPVsyncChild) {
key->DoomSubtree();
}
for (auto* key : mManagedPFetchChild) {
key->DoomSubtree();
}
SetDoomed();
}
auto PBackgroundChild::PeekManagedActor() -> IProtocol*
{
if (IProtocol* actor = mManagedPBackgroundIDBFactoryChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundIndexedDBUtilsChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundSDBConnectionChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundLSDatabaseChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundLSObserverChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundLSRequestChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundLSSimpleRequestChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundLocalStorageCacheChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundSessionStorageManagerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundSessionStorageServiceChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundStorageChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBackgroundTestChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPBroadcastChannelChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPCacheChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPCacheStorageChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPCacheStreamControlChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPClientManagerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPEndpointForReportChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPFileSystemRequestChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPGamepadEventChannelChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPGamepadTestChannelChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPHttpBackgroundChannelChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPIdleSchedulerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPLockManagerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPRemoteWorkerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPRemoteWorkerControllerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPRemoteWorkerServiceChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPSharedWorkerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPTemporaryIPCBlobChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPFileCreatorChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPMessagePortChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPCamerasChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPQuotaChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPServiceWorkerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPServiceWorkerContainerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPServiceWorkerManagerChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPServiceWorkerRegistrationChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPWebAuthnTransactionChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPUDPSocketChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPVsyncChild.Peek()) {
return actor;
}
if (IProtocol* actor = mManagedPFetchChild.Peek()) {
return actor;
}
return nullptr;
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::PBackgroundChild*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
MOZ_RELEASE_ASSERT(
aWriter->GetActor(),
"Cannot serialize managed actors without an actor");
int32_t id;
if (!aVar) {
id = 0; // kNullActorId
} else {
id = aVar->Id();
if (id == 1) { // kFreedActorId
aVar->FatalError("Actor has been |delete|d");
}
MOZ_RELEASE_ASSERT(
aWriter->GetActor()->GetIPCChannel() == aVar->GetIPCChannel(),
"Actor must be from the same channel as the"
" actor it's being sent over");
MOZ_RELEASE_ASSERT(
aVar->CanSend(),
"Actor must still be open when sending");
}
IPC::WriteParam(aWriter, id);
}
auto ParamTraits<::mozilla::ipc::PBackgroundChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
MOZ_RELEASE_ASSERT(
aReader->GetActor(),
"Cannot deserialize managed actors without an actor");
mozilla::Maybe<mozilla::ipc::IProtocol*> actor = aReader->GetActor()
->ReadActor(aReader, true, "PBackground", PBackgroundMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::ipc::PBackgroundChild*>(actor.ref());
}
return {};
}
} // namespace IPC