// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/dom/PBackgroundSessionStorageCacheChild.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/ProfilerMarkers.h" #include "mozilla/dom/DomSecurityIPCUtils.h" #include "mozilla/ipc/IPCCore.h" #include "mozilla/ipc/PBackgroundChild.h" #include "mozilla/dom/PBackgroundSessionStorageManagerChild.h" #include "ipc/IPCMessageUtils.h" #include "ipc/IPCMessageUtilsSpecializations.h" #include "nsIFile.h" #include "mozilla/ipc/Endpoint.h" #include "mozilla/ipc/ProtocolMessageUtils.h" #include "mozilla/ipc/ProtocolUtils.h" #include "mozilla/ipc/ShmemMessageUtils.h" #include "mozilla/ipc/TaintingIPCUtils.h" namespace mozilla { namespace dom { auto PBackgroundSessionStorageCacheChild::Recv__delete__() -> mozilla::ipc::IPCResult { return IPC_OK(); } MOZ_IMPLICIT PBackgroundSessionStorageCacheChild::PBackgroundSessionStorageCacheChild() : mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PBackgroundSessionStorageCacheChild); } PBackgroundSessionStorageCacheChild::~PBackgroundSessionStorageCacheChild() { MOZ_COUNT_DTOR(PBackgroundSessionStorageCacheChild); } auto PBackgroundSessionStorageCacheChild::ActorAlloc() -> void { AddRef(); } auto PBackgroundSessionStorageCacheChild::ActorDealloc() -> void { Release(); } auto PBackgroundSessionStorageCacheChild::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PBackgroundSessionStorageCacheChild::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PBackgroundSessionStorageCacheChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PBackgroundSessionStorageCacheChild::Manager() const -> PBackgroundSessionStorageManagerChild* { return static_cast(IProtocol::Manager()); } auto PBackgroundSessionStorageCacheChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PBackgroundSessionStorageCacheChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PBackgroundSessionStorageCacheChild::SendDeleteMe() -> bool { UniquePtr msg__ = PBackgroundSessionStorageCache::Msg_DeleteMe(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PBackgroundSessionStorageCache", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PBackgroundSessionStorageCacheChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PBackgroundSessionStorageCache::Msg_DeleteMe", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PBackgroundSessionStorageCacheChild::SendLoad(nsTArray* aData) -> bool { UniquePtr msg__ = PBackgroundSessionStorageCache::Msg_Load(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; UniquePtr reply__; if (mozilla::ipc::LoggingEnabledFor("PBackgroundSessionStorageCache", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PBackgroundSessionStorageCacheChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PBackgroundSessionStorageCache::Msg_Load", OTHER); bool sendok__ = false; { AUTO_PROFILER_MARKER("PBackgroundSessionStorageCache::Msg_Load", IPC); sendok__ = ChannelSend(std::move(msg__), (&(reply__))); } if ((!(sendok__))) { return false; } if (mozilla::ipc::LoggingEnabledFor("PBackgroundSessionStorageCache", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PBackgroundSessionStorageCacheChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received reply ", reply__->type(), mozilla::ipc::MessageDirection::eReceiving); } IPC::MessageReader reader__{ (*(reply__)), this}; auto maybe__aData__reply = IPC::ReadParam>((&(reader__))); if (!maybe__aData__reply) { FatalError("Error deserializing 'SSSetItemInfo[]'"); return false; } auto& aData__reply = *maybe__aData__reply; // Sentinel = 'aData' if ((!(((&(reader__)))->ReadSentinel(90571228)))) { mozilla::ipc::SentinelReadError("Error deserializing 'SSSetItemInfo[]'"); return false; } (*(aData)) = std::move(aData__reply); reader__.EndRead(); return true; } auto PBackgroundSessionStorageCacheChild::SendCheckpoint(mozilla::Span aWriteInfos) -> bool { UniquePtr msg__ = PBackgroundSessionStorageCache::Msg_Checkpoint(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aWriteInfos); // Sentinel = 'aWriteInfos' ((&(writer__)))->WriteSentinel(437781612); if (mozilla::ipc::LoggingEnabledFor("PBackgroundSessionStorageCache", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PBackgroundSessionStorageCacheChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PBackgroundSessionStorageCache::Msg_Checkpoint", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PBackgroundSessionStorageCacheChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PBackgroundSessionStorageCacheChild::OnMessageReceived(const Message& msg__) -> PBackgroundSessionStorageCacheChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PBackgroundSessionStorageCache", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PBackgroundSessionStorageCacheChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE: { if (!mAwaitingManagedEndpointBind) { NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!"); return MsgNotAllowed; } mAwaitingManagedEndpointBind = false; return MsgProcessed; } case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE: { if (!mAwaitingManagedEndpointBind) { NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!"); return MsgNotAllowed; } mAwaitingManagedEndpointBind = false; this->ActorDisconnected(ManagedEndpointDropped); return MsgProcessed; } case PBackgroundSessionStorageCache::Msg___delete____ID: { if (mozilla::ipc::LoggingEnabledFor("PBackgroundSessionStorageCache", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PBackgroundSessionStorageCacheChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PBackgroundSessionStorageCache::Msg___delete__", OTHER); DoomSubtree(); mozilla::ipc::IPCResult __ok = (this)->Recv__delete__(); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } this->ActorDisconnected(Deletion); return MsgProcessed; } default: return MsgNotKnown; } } auto PBackgroundSessionStorageCacheChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PBackgroundSessionStorageCacheChild::Result { if (!CanSend()) { return MsgDropped; } return MsgNotKnown; } } // namespace dom } // namespace mozilla