// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/PRDDChild.h" #include "mozilla/D3DMessageUtils.h" #include "mozilla/GfxMessageUtils.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/RDDChild.h" #include "mozilla/ipc/ByteBufUtils.h" #include "mozilla/ipc/IPCCore.h" #include "mozilla/PProfilerChild.h" #include "mozilla/PRemoteMediaManagerChild.h" #include "mozilla/layers/PVideoBridgeChild.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 { auto PRDDChild::ProcessingError( Result aCode, const char* aReason) -> void { } auto PRDDChild::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PRDDChild::PRDDChild() : mozilla::ipc::IToplevelProtocol("PRDDChild", kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PRDDChild); } PRDDChild::~PRDDChild() { MOZ_COUNT_DTOR(PRDDChild); } auto PRDDChild::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PRDDChild'"); AddRef(); } auto PRDDChild::ActorDealloc() -> void { Release(); } auto PRDDChild::OtherPid() const -> ::base::ProcessId { ::base::ProcessId pid = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid(); MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId); return pid; } auto PRDDChild::OtherChildID() const -> ::GeckoChildID { ::GeckoChildID childID = ::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid(); MOZ_RELEASE_ASSERT(childID != -1); return childID; } auto PRDDChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo { return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()}; } auto PRDDChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PRDDChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PRDDChild::RejectPendingResponses(ResponseRejectReason aReason) -> void { mAsyncCallbacks.RejectPendingResponses(aReason); } auto PRDDChild::SendInit( mozilla::Span vars, const mozilla::Maybe& sandboxBroker, const bool& canRecordReleaseTelemetry, const bool& aIsReadyForBackgroundProcessing) -> bool { UniquePtr msg__ = PRDD::Msg_Init(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), vars); // Sentinel = 'vars' ((&(writer__)))->WriteSentinel(72745405); IPC::WriteParam((&(writer__)), sandboxBroker); // Sentinel = 'sandboxBroker' ((&(writer__)))->WriteSentinel(625149269); IPC::WriteParam((&(writer__)), canRecordReleaseTelemetry); // Sentinel = 'canRecordReleaseTelemetry' ((&(writer__)))->WriteSentinel(2148731406); IPC::WriteParam((&(writer__)), aIsReadyForBackgroundProcessing); // Sentinel = 'aIsReadyForBackgroundProcessing' ((&(writer__)))->WriteSentinel(3228372055); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_Init", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::SendInitProfiler(Endpoint<::mozilla::PProfilerChild>&& endpoint) -> bool { UniquePtr msg__ = PRDD::Msg_InitProfiler(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), std::move(endpoint)); // Sentinel = 'endpoint' ((&(writer__)))->WriteSentinel(251724642); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_InitProfiler", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::SendNewContentRemoteMediaManager( Endpoint<::mozilla::PRemoteMediaManagerParent>&& endpoint, const ContentParentId& childId) -> bool { UniquePtr msg__ = PRDD::Msg_NewContentRemoteMediaManager(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), std::move(endpoint)); // Sentinel = 'endpoint' ((&(writer__)))->WriteSentinel(251724642); IPC::WriteParam((&(writer__)), childId); // Sentinel = 'childId' ((&(writer__)))->WriteSentinel(185270962); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_NewContentRemoteMediaManager", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::SendRequestMemoryReport( const uint32_t& generation, const bool& anonymize, const bool& minimizeMemoryUsage, const mozilla::Maybe& DMDFile, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PRDD::Msg_RequestMemoryReport(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), generation); // Sentinel = 'generation' ((&(writer__)))->WriteSentinel(381158445); IPC::WriteParam((&(writer__)), anonymize); // Sentinel = 'anonymize' ((&(writer__)))->WriteSentinel(321127387); IPC::WriteParam((&(writer__)), minimizeMemoryUsage); // Sentinel = 'minimizeMemoryUsage' ((&(writer__)))->WriteSentinel(1321600977); IPC::WriteParam((&(writer__)), DMDFile); // Sentinel = 'DMDFile' ((&(writer__)))->WriteSentinel(143983190); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_RequestMemoryReport", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PRDD::Reply_RequestMemoryReport__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__aGeneration = IPC::ReadParam(aReader); if (!maybe__aGeneration) { (aReader)->FatalError("Error deserializing 'uint32_t'"); return MsgValueError; } auto& aGeneration = *maybe__aGeneration; // Sentinel = 'aGeneration' if ((!((aReader)->ReadSentinel(430179438)))) { mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(aGeneration)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PRDDChild::SendRequestMemoryReport( const uint32_t& generation, const bool& anonymize, const bool& minimizeMemoryUsage, const mozilla::Maybe& DMDFile) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendRequestMemoryReport(std::forward(generation), std::forward(anonymize), std::forward(minimizeMemoryUsage), std::forward&>(DMDFile), [promise__](uint32_t&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PRDDChild::SendPreferenceUpdate(const Pref& pref) -> bool { UniquePtr msg__ = PRDD::Msg_PreferenceUpdate(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), pref); // Sentinel = 'pref' ((&(writer__)))->WriteSentinel(71958958); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_PreferenceUpdate", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::SendUpdateVar(mozilla::Span var) -> bool { UniquePtr msg__ = PRDD::Msg_UpdateVar(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), var); // Sentinel = 'var' ((&(writer__)))->WriteSentinel(43581770); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_UpdateVar", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::SendInitVideoBridge( Endpoint<::mozilla::layers::PVideoBridgeChild>&& endpoint, const bool& createHardwareDevice, const ContentDeviceData& contentDeviceData) -> bool { UniquePtr msg__ = PRDD::Msg_InitVideoBridge(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), std::move(endpoint)); // Sentinel = 'endpoint' ((&(writer__)))->WriteSentinel(251724642); IPC::WriteParam((&(writer__)), createHardwareDevice); // Sentinel = 'createHardwareDevice' ((&(writer__)))->WriteSentinel(1403914227); IPC::WriteParam((&(writer__)), contentDeviceData); // Sentinel = 'contentDeviceData' ((&(writer__)))->WriteSentinel(1043203782); if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_InitVideoBridge", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::SendFlushFOGData( mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PRDD::Msg_FlushFOGData(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_FlushFOGData", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PRDD::Reply_FlushFOGData__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__buf = IPC::ReadParam(aReader); if (!maybe__buf) { (aReader)->FatalError("Error deserializing 'ByteBuf'"); return MsgValueError; } auto& buf = *maybe__buf; // Sentinel = 'buf' if ((!((aReader)->ReadSentinel(41484606)))) { mozilla::ipc::SentinelReadError("Error deserializing 'ByteBuf'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(buf)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PRDDChild::SendFlushFOGData() -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendFlushFOGData([promise__](ByteBuf&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PRDDChild::SendTestTriggerMetrics( mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PRDD::Msg_TestTriggerMetrics(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_TestTriggerMetrics", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PRDD::Reply_TestTriggerMetrics__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__unused = IPC::ReadParam(aReader); if (!maybe__unused) { (aReader)->FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& unused = *maybe__unused; // Sentinel = 'unused' if ((!((aReader)->ReadSentinel(155517589)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(unused)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PRDDChild::SendTestTriggerMetrics() -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendTestTriggerMetrics([promise__](bool&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PRDDChild::SendTestTelemetryProbes() -> bool { UniquePtr msg__ = PRDD::Msg_TestTelemetryProbes(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PRDD::Msg_TestTelemetryProbes", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PRDDChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PRDDChild::OnMessageReceived(const Message& msg__) -> PRDDChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { case PRDD::Reply_RequestMemoryReport__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_RequestMemoryReport", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PRDD::Reply_FlushFOGData__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_FlushFOGData", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PRDD::Reply_TestTriggerMetrics__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_TestTriggerMetrics", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PRDD::Msg_InitCrashReporter__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_InitCrashReporter", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aInitArgs = IPC::ReadParam((&(reader__))); if (!maybe__aInitArgs) { FatalError("Error deserializing 'CrashReporterInitArgs'"); return MsgValueError; } auto& aInitArgs = *maybe__aInitArgs; // Sentinel = 'aInitArgs' if ((!(((&(reader__)))->ReadSentinel(286327683)))) { mozilla::ipc::SentinelReadError("Error deserializing 'CrashReporterInitArgs'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvInitCrashReporter(std::move(aInitArgs)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_AddMemoryReport__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_AddMemoryReport", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aReport = IPC::ReadParam((&(reader__))); if (!maybe__aReport) { FatalError("Error deserializing 'MemoryReport'"); return MsgValueError; } auto& aReport = *maybe__aReport; // Sentinel = 'aReport' if ((!(((&(reader__)))->ReadSentinel(184025822)))) { mozilla::ipc::SentinelReadError("Error deserializing 'MemoryReport'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvAddMemoryReport(std::move(aReport)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_UpdateMediaCodecsSupported__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_UpdateMediaCodecsSupported", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__aSupported = IPC::ReadParam((&(reader__))); if (!maybe__aSupported) { FatalError("Error deserializing 'MediaCodecsSupported'"); return MsgValueError; } auto& aSupported = *maybe__aSupported; // Sentinel = 'aSupported' if ((!(((&(reader__)))->ReadSentinel(378799144)))) { mozilla::ipc::SentinelReadError("Error deserializing 'MediaCodecsSupported'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvUpdateMediaCodecsSupported(std::move(aSupported)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_AccumulateChildHistograms__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_AccumulateChildHistograms", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__accumulations = IPC::ReadParam>((&(reader__))); if (!maybe__accumulations) { FatalError("Error deserializing 'HistogramAccumulation[]'"); return MsgValueError; } auto& accumulations = *maybe__accumulations; // Sentinel = 'accumulations' if ((!(((&(reader__)))->ReadSentinel(632030585)))) { mozilla::ipc::SentinelReadError("Error deserializing 'HistogramAccumulation[]'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvAccumulateChildHistograms(std::move(accumulations)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_AccumulateChildKeyedHistograms__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_AccumulateChildKeyedHistograms", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__accumulations = IPC::ReadParam>((&(reader__))); if (!maybe__accumulations) { FatalError("Error deserializing 'KeyedHistogramAccumulation[]'"); return MsgValueError; } auto& accumulations = *maybe__accumulations; // Sentinel = 'accumulations' if ((!(((&(reader__)))->ReadSentinel(632030585)))) { mozilla::ipc::SentinelReadError("Error deserializing 'KeyedHistogramAccumulation[]'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvAccumulateChildKeyedHistograms(std::move(accumulations)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_UpdateChildScalars__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_UpdateChildScalars", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__actions = IPC::ReadParam>((&(reader__))); if (!maybe__actions) { FatalError("Error deserializing 'ScalarAction[]'"); return MsgValueError; } auto& actions = *maybe__actions; // Sentinel = 'actions' if ((!(((&(reader__)))->ReadSentinel(193200882)))) { mozilla::ipc::SentinelReadError("Error deserializing 'ScalarAction[]'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvUpdateChildScalars(std::move(actions)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_UpdateChildKeyedScalars__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_UpdateChildKeyedScalars", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__actions = IPC::ReadParam>((&(reader__))); if (!maybe__actions) { FatalError("Error deserializing 'KeyedScalarAction[]'"); return MsgValueError; } auto& actions = *maybe__actions; // Sentinel = 'actions' if ((!(((&(reader__)))->ReadSentinel(193200882)))) { mozilla::ipc::SentinelReadError("Error deserializing 'KeyedScalarAction[]'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvUpdateChildKeyedScalars(std::move(actions)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_RecordChildEvents__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_RecordChildEvents", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__events = IPC::ReadParam>((&(reader__))); if (!maybe__events) { FatalError("Error deserializing 'ChildEventData[]'"); return MsgValueError; } auto& events = *maybe__events; // Sentinel = 'events' if ((!(((&(reader__)))->ReadSentinel(149619350)))) { mozilla::ipc::SentinelReadError("Error deserializing 'ChildEventData[]'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvRecordChildEvents(std::move(events)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_RecordDiscardedData__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_RecordDiscardedData", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__data = IPC::ReadParam((&(reader__))); if (!maybe__data) { FatalError("Error deserializing 'DiscardedData'"); return MsgValueError; } auto& data = *maybe__data; // Sentinel = 'data' if ((!(((&(reader__)))->ReadSentinel(67109275)))) { mozilla::ipc::SentinelReadError("Error deserializing 'DiscardedData'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvRecordDiscardedData(std::move(data)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PRDD::Msg_FOGData__ID: { if (mozilla::ipc::LoggingEnabledFor("PRDD", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PRDDChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PRDD::Msg_FOGData", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__buf = IPC::ReadParam((&(reader__))); if (!maybe__buf) { FatalError("Error deserializing 'ByteBuf'"); return MsgValueError; } auto& buf = *maybe__buf; // Sentinel = 'buf' if ((!(((&(reader__)))->ReadSentinel(41484606)))) { mozilla::ipc::SentinelReadError("Error deserializing 'ByteBuf'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::RDDChild*>(this))->RecvFOGData(std::move(buf)); 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 PRDDChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PRDDChild::Result { if (!CanSend()) { return MsgDropped; } MOZ_ASSERT_UNREACHABLE("message protocol not supported"); return MsgNotKnown; } } // namespace mozilla