Copy as Markdown
Other Tools
//
// 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/PRemoteDecoderManagerChild.h"
#include "mozilla/layers/PVideoBridgeChild.h"
#include "mozilla/PSandboxTestingChild.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<mozilla::ipc::ProtocolId const>
{
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<GfxVarUpdate const> vars,
const mozilla::Maybe<FileDescriptor>& sandboxBroker,
const bool& canRecordReleaseTelemetry,
const bool& aIsReadyForBackgroundProcessing) -> bool
{
UniquePtr<IPC::Message> 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<IPC::Message> 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::SendNewContentRemoteDecoderManager(
Endpoint<::mozilla::PRemoteDecoderManagerParent>&& endpoint,
const ContentParentId& childId) -> bool
{
UniquePtr<IPC::Message> msg__ = PRDD::Msg_NewContentRemoteDecoderManager(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_NewContentRemoteDecoderManager", 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<FileDescriptor>& DMDFile,
mozilla::ipc::ResolveCallback<uint32_t>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> 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);
int32_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<uint32_t>(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<FileDescriptor>& DMDFile) -> RefPtr<RequestMemoryReportPromise>
{
RefPtr<MozPromise<uint32_t, ResponseRejectReason, true>::Private> promise__ = new MozPromise<uint32_t, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendRequestMemoryReport(std::move(generation), std::move(anonymize), std::move(minimizeMemoryUsage), std::move(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<IPC::Message> 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(const GfxVarUpdate& var) -> bool
{
UniquePtr<IPC::Message> 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<IPC::Message> 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::SendInitSandboxTesting(Endpoint<::mozilla::PSandboxTestingChild>&& aEndpoint) -> bool
{
UniquePtr<IPC::Message> msg__ = PRDD::Msg_InitSandboxTesting(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), std::move(aEndpoint));
// Sentinel = 'aEndpoint'
((&(writer__)))->WriteSentinel(292225955);
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_InitSandboxTesting", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PRDDChild::SendFlushFOGData(
mozilla::ipc::ResolveCallback<ByteBuf>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> 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);
int32_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<ByteBuf>(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<FlushFOGDataPromise>
{
RefPtr<MozPromise<ByteBuf, ResponseRejectReason, true>::Private> promise__ = new MozPromise<ByteBuf, ResponseRejectReason, true>::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<bool>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> 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);
int32_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<bool>(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<TestTriggerMetricsPromise>
{
RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::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<IPC::Message> 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(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PRDDChild::OnMessageReceived(const Message& msg__) -> PRDDChild::Result
{
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__threadId = IPC::ReadParam<NativeThreadId>((&(reader__)));
if (!maybe__threadId) {
FatalError("Error deserializing 'NativeThreadId'");
return MsgValueError;
}
auto& threadId = *maybe__threadId;
// Sentinel = 'threadId'
if ((!(((&(reader__)))->ReadSentinel(248185638)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'NativeThreadId'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<RDDChild*>(this))->RecvInitCrashReporter(std::move(threadId));
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<MemoryReport>((&(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<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<MediaCodecsSupported>((&(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<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<nsTArray<HistogramAccumulation>>((&(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<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<nsTArray<KeyedHistogramAccumulation>>((&(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<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<nsTArray<ScalarAction>>((&(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<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<nsTArray<KeyedScalarAction>>((&(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<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<nsTArray<ChildEventData>>((&(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<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<DiscardedData>((&(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<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<ByteBuf>((&(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<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<Message>& reply__) -> PRDDChild::Result
{
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::PRDDChild*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
MOZ_RELEASE_ASSERT(
aWriter->GetActor(),
"Cannot serialize managed actors without an actor");
int32_t id;
if (!aVar) {
id = 0; // kNullActorId
} else {
id = aVar->Id();
if (id == 1) { // kFreedActorId
aVar->FatalError("Actor has been |delete|d");
}
MOZ_RELEASE_ASSERT(
aWriter->GetActor()->GetIPCChannel() == aVar->GetIPCChannel(),
"Actor must be from the same channel as the"
" actor it's being sent over");
MOZ_RELEASE_ASSERT(
aVar->CanSend(),
"Actor must still be open when sending");
}
IPC::WriteParam(aWriter, id);
}
auto ParamTraits<::mozilla::PRDDChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
MOZ_RELEASE_ASSERT(
aReader->GetActor(),
"Cannot deserialize managed actors without an actor");
mozilla::Maybe<mozilla::ipc::IProtocol*> actor = aReader->GetActor()
->ReadActor(aReader, true, "PRDD", PRDDMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::PRDDChild*>(actor.ref());
}
return {};
}
} // namespace IPC