// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/dom/quota/PRemoteQuotaObjectParent.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/dom/quota/RemoteQuotaObjectParent.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 { namespace quota { auto PRemoteQuotaObjectParent::ProcessingError( Result aCode, const char* aReason) -> void { } auto PRemoteQuotaObjectParent::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PRemoteQuotaObjectParent::PRemoteQuotaObjectParent() : mozilla::ipc::IToplevelProtocol("PRemoteQuotaObjectParent", kProtocolId, mozilla::ipc::ParentSide) { MOZ_COUNT_CTOR(PRemoteQuotaObjectParent); } PRemoteQuotaObjectParent::~PRemoteQuotaObjectParent() { MOZ_COUNT_DTOR(PRemoteQuotaObjectParent); } auto PRemoteQuotaObjectParent::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PRemoteQuotaObjectParent'"); AddRef(); } auto PRemoteQuotaObjectParent::ActorDealloc() -> void { Release(); } auto PRemoteQuotaObjectParent::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PRemoteQuotaObjectParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PRemoteQuotaObjectParent::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PRemoteQuotaObjectParent::OnMessageReceived(const Message& msg__) -> PRemoteQuotaObjectParent::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PRemoteQuotaObject", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PRemoteQuotaObjectParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { 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 PRemoteQuotaObjectParent::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PRemoteQuotaObjectParent::Result { if (!CanSend()) { return MsgDropped; } switch (msg__.type()) { case PRemoteQuotaObject::Msg_MaybeUpdateSize__ID: { if (mozilla::ipc::LoggingEnabledFor("PRemoteQuotaObject", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PRemoteQuotaObjectParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRemoteQuotaObject::Msg_MaybeUpdateSize", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__size = IPC::ReadParam((&(reader__))); if (!maybe__size) { FatalError("Error deserializing 'int64_t'"); return MsgValueError; } auto& size = *maybe__size; // Sentinel = 'size' if ((!(((&(reader__)))->ReadSentinel(73662908)))) { mozilla::ipc::SentinelReadError("Error deserializing 'int64_t'"); return MsgValueError; } auto maybe__truncate = IPC::ReadParam((&(reader__))); if (!maybe__truncate) { FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& truncate = *maybe__truncate; // Sentinel = 'truncate' if ((!(((&(reader__)))->ReadSentinel(262538087)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL; bool result{}; mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::dom::quota::RemoteQuotaObjectParent*>(this))->RecvMaybeUpdateSize(std::move(size), std::move(truncate), (&(result))); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } reply__ = PRemoteQuotaObject::Reply_MaybeUpdateSize(id__); IPC::MessageWriter writer__{ (*(reply__)), this}; IPC::WriteParam((&(writer__)), result); // Sentinel = 'result' ((&(writer__)))->WriteSentinel(153223840); if (mozilla::ipc::LoggingEnabledFor("PRemoteQuotaObject", mozilla::ipc::ParentSide)) { mozilla::ipc::LogMessageForProtocol( "PRemoteQuotaObjectParent", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending reply ", reply__->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } default: return MsgNotKnown; } } } // namespace quota } // namespace dom } // namespace mozilla