Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/ipc/PUtilityProcessChild.h"
#include "mozilla/D3DMessageUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ipc/ByteBufUtils.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/UtilityProcessChild.h"
#include "mozilla/PProfilerChild.h"
#include "mozilla/ipc/PUtilityAudioDecoderChild.h"
#include "mozilla/dom/PJSOracleChild.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 {
namespace ipc {
auto PUtilityProcessChild::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PUtilityProcessChild::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PUtilityProcessChild::PUtilityProcessChild() :
mozilla::ipc::IToplevelProtocol("PUtilityProcessChild", kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PUtilityProcessChild);
}
PUtilityProcessChild::~PUtilityProcessChild()
{
MOZ_COUNT_DTOR(PUtilityProcessChild);
}
auto PUtilityProcessChild::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsUtilityProcess(), "Invalid process for `PUtilityProcessChild'");
AddRef();
}
auto PUtilityProcessChild::ActorDealloc() -> void
{
Release();
}
auto PUtilityProcessChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PUtilityProcessChild::OtherChildID() const -> ::GeckoChildID
{
::GeckoChildID childID =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
MOZ_RELEASE_ASSERT(childID != -1);
return childID;
}
auto PUtilityProcessChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}
auto PUtilityProcessChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PUtilityProcessChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PUtilityProcessChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PUtilityProcessChild::SendInitCrashReporter(const NativeThreadId& threadId) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_InitCrashReporter(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), threadId);
// Sentinel = 'threadId'
((&(writer__)))->WriteSentinel(248185638);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_InitCrashReporter", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendAddMemoryReport(const MemoryReport& aReport) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_AddMemoryReport(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aReport);
// Sentinel = 'aReport'
((&(writer__)))->WriteSentinel(184025822);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_AddMemoryReport", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendFOGData(ByteBuf&& buf) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_FOGData(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), std::move(buf));
// Sentinel = 'buf'
((&(writer__)))->WriteSentinel(41484606);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_FOGData", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendAccumulateChildHistograms(mozilla::Span<HistogramAccumulation const> accumulations) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_AccumulateChildHistograms(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), accumulations);
// Sentinel = 'accumulations'
((&(writer__)))->WriteSentinel(632030585);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_AccumulateChildHistograms", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendAccumulateChildKeyedHistograms(mozilla::Span<KeyedHistogramAccumulation const> accumulations) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_AccumulateChildKeyedHistograms(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), accumulations);
// Sentinel = 'accumulations'
((&(writer__)))->WriteSentinel(632030585);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_AccumulateChildKeyedHistograms", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendUpdateChildScalars(mozilla::Span<ScalarAction const> actions) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_UpdateChildScalars(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actions);
// Sentinel = 'actions'
((&(writer__)))->WriteSentinel(193200882);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_UpdateChildScalars", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendUpdateChildKeyedScalars(mozilla::Span<KeyedScalarAction const> actions) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_UpdateChildKeyedScalars(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actions);
// Sentinel = 'actions'
((&(writer__)))->WriteSentinel(193200882);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_UpdateChildKeyedScalars", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendRecordChildEvents(mozilla::Span<ChildEventData const> events) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_RecordChildEvents(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), events);
// Sentinel = 'events'
((&(writer__)))->WriteSentinel(149619350);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_RecordChildEvents", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendRecordDiscardedData(const DiscardedData& data) -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_RecordDiscardedData(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), data);
// Sentinel = 'data'
((&(writer__)))->WriteSentinel(67109275);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_RecordDiscardedData", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::SendInitCompleted() -> bool
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_InitCompleted(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_InitCompleted", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PUtilityProcessChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PUtilityProcessChild::OnMessageReceived(const Message& msg__) -> PUtilityProcessChild::Result
{
switch (msg__.type()) {
case PUtilityProcess::Msg_Init__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_Init", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__sandboxBroker = IPC::ReadParam<mozilla::Maybe<FileDescriptor>>((&(reader__)));
if (!maybe__sandboxBroker) {
FatalError("Error deserializing 'FileDescriptor?'");
return MsgValueError;
}
auto& sandboxBroker = *maybe__sandboxBroker;
// Sentinel = 'sandboxBroker'
if ((!(((&(reader__)))->ReadSentinel(625149269)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor?'");
return MsgValueError;
}
auto maybe__canRecordReleaseTelemetry = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__canRecordReleaseTelemetry) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& canRecordReleaseTelemetry = *maybe__canRecordReleaseTelemetry;
// Sentinel = 'canRecordReleaseTelemetry'
if ((!(((&(reader__)))->ReadSentinel(2148731406)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
auto maybe__aIsReadyForBackgroundProcessing = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__aIsReadyForBackgroundProcessing) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aIsReadyForBackgroundProcessing = *maybe__aIsReadyForBackgroundProcessing;
// Sentinel = 'aIsReadyForBackgroundProcessing'
if ((!(((&(reader__)))->ReadSentinel(3228372055)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvInit(std::move(sandboxBroker), std::move(canRecordReleaseTelemetry), std::move(aIsReadyForBackgroundProcessing));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_InitProfiler__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_InitProfiler", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__endpoint = IPC::ReadParam<Endpoint<::mozilla::PProfilerChild>>((&(reader__)));
if (!maybe__endpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::PProfilerChild>'");
return MsgValueError;
}
auto& endpoint = *maybe__endpoint;
// Sentinel = 'endpoint'
if ((!(((&(reader__)))->ReadSentinel(251724642)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::PProfilerChild>'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvInitProfiler(std::move(endpoint));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_RequestMemoryReport__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_RequestMemoryReport", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__generation = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__generation) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& generation = *maybe__generation;
// Sentinel = 'generation'
if ((!(((&(reader__)))->ReadSentinel(381158445)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__anonymize = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__anonymize) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& anonymize = *maybe__anonymize;
// Sentinel = 'anonymize'
if ((!(((&(reader__)))->ReadSentinel(321127387)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
auto maybe__minimizeMemoryUsage = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__minimizeMemoryUsage) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& minimizeMemoryUsage = *maybe__minimizeMemoryUsage;
// Sentinel = 'minimizeMemoryUsage'
if ((!(((&(reader__)))->ReadSentinel(1321600977)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
auto maybe__DMDFile = IPC::ReadParam<mozilla::Maybe<FileDescriptor>>((&(reader__)));
if (!maybe__DMDFile) {
FatalError("Error deserializing 'FileDescriptor?'");
return MsgValueError;
}
auto& DMDFile = *maybe__DMDFile;
// Sentinel = 'DMDFile'
if ((!(((&(reader__)))->ReadSentinel(143983190)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'FileDescriptor?'");
return MsgValueError;
}
reader__.EndRead();
int32_t id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PUtilityProcess::Reply_RequestMemoryReport(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
RequestMemoryReportResolver resolver = [resolver__ = std::move(resolver__)](const uint32_t& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'aGeneration'
((&(writer__)))->WriteSentinel(430179438);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvRequestMemoryReport(std::move(generation), std::move(anonymize), std::move(minimizeMemoryUsage), std::move(DMDFile), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_PreferenceUpdate__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_PreferenceUpdate", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__pref = IPC::ReadParam<Pref>((&(reader__)));
if (!maybe__pref) {
FatalError("Error deserializing 'Pref'");
return MsgValueError;
}
auto& pref = *maybe__pref;
// Sentinel = 'pref'
if ((!(((&(reader__)))->ReadSentinel(71958958)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Pref'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvPreferenceUpdate(std::move(pref));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_FlushFOGData__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_FlushFOGData", OTHER);
int32_t id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PUtilityProcess::Reply_FlushFOGData(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
FlushFOGDataResolver resolver = [resolver__ = std::move(resolver__)](ByteBuf&& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), std::move(aParam));
// Sentinel = 'buf'
((&(writer__)))->WriteSentinel(41484606);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvFlushFOGData(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_TestTriggerMetrics__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_TestTriggerMetrics", OTHER);
int32_t id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PUtilityProcess::Reply_TestTriggerMetrics(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
TestTriggerMetricsResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'unused'
((&(writer__)))->WriteSentinel(155517589);
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvTestTriggerMetrics(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_TestTelemetryProbes__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_TestTelemetryProbes", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvTestTelemetryProbes();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_StartUtilityAudioDecoderService__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_StartUtilityAudioDecoderService", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::ipc::PUtilityAudioDecoderParent>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::ipc::PUtilityAudioDecoderParent>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::ipc::PUtilityAudioDecoderParent>'");
return MsgValueError;
}
auto maybe__updates = IPC::ReadParam<nsTArray<GfxVarUpdate>>((&(reader__)));
if (!maybe__updates) {
FatalError("Error deserializing 'GfxVarUpdate[]'");
return MsgValueError;
}
auto& updates = *maybe__updates;
// Sentinel = 'updates'
if ((!(((&(reader__)))->ReadSentinel(199951095)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'GfxVarUpdate[]'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvStartUtilityAudioDecoderService(std::move(aEndpoint), std::move(updates));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_StartJSOracleService__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_StartJSOracleService", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::dom::PJSOracleChild>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::dom::PJSOracleChild>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::dom::PJSOracleChild>'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvStartJSOracleService(std::move(aEndpoint));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PUtilityProcess::Msg_InitSandboxTesting__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PUtilityProcess", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PUtilityProcessChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PUtilityProcess::Msg_InitSandboxTesting", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::PSandboxTestingChild>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::PSandboxTestingChild>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::PSandboxTestingChild>'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvInitSandboxTesting(std::move(aEndpoint));
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 PUtilityProcessChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PUtilityProcessChild::Result
{
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::PUtilityProcessChild*>::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::ipc::PUtilityProcessChild*>::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, "PUtilityProcess", PUtilityProcessMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::ipc::PUtilityProcessChild*>(actor.ref());
}
return {};
}
} // namespace IPC