// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/dom/quota/PRemoteQuotaObjectChild.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/ProfilerMarkers.h" #include "mozilla/dom/quota/RemoteQuotaObjectChild.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 PRemoteQuotaObjectChild::ProcessingError( Result aCode, const char* aReason) -> void { } auto PRemoteQuotaObjectChild::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PRemoteQuotaObjectChild::PRemoteQuotaObjectChild() : mozilla::ipc::IToplevelProtocol("PRemoteQuotaObjectChild", kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PRemoteQuotaObjectChild); } PRemoteQuotaObjectChild::~PRemoteQuotaObjectChild() { MOZ_COUNT_DTOR(PRemoteQuotaObjectChild); } auto PRemoteQuotaObjectChild::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsParentProcess() || XRE_IsContentProcess(), "Invalid process for `PRemoteQuotaObjectChild'"); AddRef(); } auto PRemoteQuotaObjectChild::ActorDealloc() -> void { Release(); } auto PRemoteQuotaObjectChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PRemoteQuotaObjectChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PRemoteQuotaObjectChild::SendMaybeUpdateSize( const int64_t& size, const bool& truncate, bool* result) -> bool { UniquePtr msg__ = PRemoteQuotaObject::Msg_MaybeUpdateSize(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), size); // Sentinel = 'size' ((&(writer__)))->WriteSentinel(73662908); IPC::WriteParam((&(writer__)), truncate); // Sentinel = 'truncate' ((&(writer__)))->WriteSentinel(262538087); UniquePtr reply__; if (mozilla::ipc::LoggingEnabledFor("PRemoteQuotaObject", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRemoteQuotaObjectChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRemoteQuotaObject::Msg_MaybeUpdateSize", OTHER); bool sendok__ = false; { AUTO_PROFILER_MARKER("PRemoteQuotaObject::Msg_MaybeUpdateSize", IPC); sendok__ = ChannelSend(std::move(msg__), (&(reply__))); } if ((!(sendok__))) { return false; } if (mozilla::ipc::LoggingEnabledFor("PRemoteQuotaObject", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRemoteQuotaObjectChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received reply ", reply__->type(), mozilla::ipc::MessageDirection::eReceiving); } IPC::MessageReader reader__{ (*(reply__)), this}; auto maybe__result__reply = IPC::ReadParam((&(reader__))); if (!maybe__result__reply) { FatalError("Error deserializing 'bool'"); return false; } auto& result__reply = *maybe__result__reply; // Sentinel = 'result' if ((!(((&(reader__)))->ReadSentinel(153223840)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return false; } (*(result)) = std::move(result__reply); reader__.EndRead(); return true; } auto PRemoteQuotaObjectChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PRemoteQuotaObjectChild::OnMessageReceived(const Message& msg__) -> PRemoteQuotaObjectChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PRemoteQuotaObject", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRemoteQuotaObjectChild", 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 PRemoteQuotaObjectChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PRemoteQuotaObjectChild::Result { if (!CanSend()) { return MsgDropped; } return MsgNotKnown; } } // namespace quota } // namespace dom } // namespace mozilla