// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/PWebBrowserPersistSerializeChild.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/PWebBrowserPersistDocumentChild.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 { MOZ_IMPLICIT PWebBrowserPersistSerializeChild::PWebBrowserPersistSerializeChild() : mozilla::ipc::IProtocol(kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PWebBrowserPersistSerializeChild); } PWebBrowserPersistSerializeChild::~PWebBrowserPersistSerializeChild() { MOZ_COUNT_DTOR(PWebBrowserPersistSerializeChild); } auto PWebBrowserPersistSerializeChild::ActorAlloc() -> void { } auto PWebBrowserPersistSerializeChild::ActorDealloc() -> void { if (Manager()) { Manager()->DeallocManagee(kProtocolId, this); } } auto PWebBrowserPersistSerializeChild::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PWebBrowserPersistSerializeChild::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PWebBrowserPersistSerializeChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PWebBrowserPersistSerializeChild::Manager() const -> PWebBrowserPersistDocumentChild* { return static_cast(IProtocol::Manager()); } auto PWebBrowserPersistSerializeChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PWebBrowserPersistSerializeChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PWebBrowserPersistSerializeChild::SendWriteData(mozilla::Span aData) -> bool { UniquePtr msg__ = PWebBrowserPersistSerialize::Msg_WriteData(Id()); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), aData); // Sentinel = 'aData' ((&(writer__)))->WriteSentinel(90571228); if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistSerialize", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PWebBrowserPersistSerializeChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PWebBrowserPersistSerialize::Msg_WriteData", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PWebBrowserPersistSerializeChild::Send__delete__( PWebBrowserPersistSerializeChild* actor, const nsACString& aContentType, const nsresult& aStatus) -> bool { if (!actor || !actor->CanSend()) { NS_WARNING("Attempt to __delete__ missing or closed actor"); return false; } UniquePtr msg__ = PWebBrowserPersistSerialize::Msg___delete__((actor)->Id()); IPC::MessageWriter writer__{ (*(msg__)), actor}; IPC::WriteParam((&(writer__)), aContentType); // Sentinel = 'aContentType' ((&(writer__)))->WriteSentinel(518522079); IPC::WriteParam((&(writer__)), aStatus); // Sentinel = 'aStatus' ((&(writer__)))->WriteSentinel(186712806); if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistSerialize", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PWebBrowserPersistSerializeChild", actor->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PWebBrowserPersistSerialize::Msg___delete__", OTHER); bool sendok__ = (actor)->ChannelSend(std::move(msg__)); actor->ActorDisconnected(Deletion); return sendok__; } auto PWebBrowserPersistSerializeChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PWebBrowserPersistSerializeChild::OnMessageReceived(const Message& msg__) -> PWebBrowserPersistSerializeChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PWebBrowserPersistSerialize", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PWebBrowserPersistSerializeChild", 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 PWebBrowserPersistSerialize::Reply___delete____ID: { return MsgProcessed; } default: return MsgNotKnown; } } auto PWebBrowserPersistSerializeChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PWebBrowserPersistSerializeChild::Result { if (!CanSend()) { return MsgDropped; } return MsgNotKnown; } } // namespace mozilla