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/dom/PWindowsUtilsChild.h"
#include "mozilla/widget/filedialog/PWinFileDialogChild.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::SendGetModulesTrust(
ModulePaths&& aModPaths,
const bool& aRunAtNormalPriority,
mozilla::ipc::ResolveCallback<mozilla::Maybe<ModulesMapResult>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PUtilityProcess::Msg_GetModulesTrust(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), std::move(aModPaths));
// Sentinel = 'aModPaths'
((&(writer__)))->WriteSentinel(284033922);
IPC::WriteParam((&(writer__)), aRunAtNormalPriority);
// Sentinel = 'aRunAtNormalPriority'
((&(writer__)))->WriteSentinel(1380517911);
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_GetModulesTrust", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PUtilityProcess::Reply_GetModulesTrust__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__modMapResult = IPC::ReadParam<mozilla::Maybe<ModulesMapResult>>(aReader);
if (!maybe__modMapResult) {
(aReader)->FatalError("Error deserializing 'ModulesMapResult?'");
return MsgValueError;
}
auto& modMapResult = *maybe__modMapResult;
// Sentinel = 'modMapResult'
if ((!((aReader)->ReadSentinel(519963870)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ModulesMapResult?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(modMapResult));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PUtilityProcessChild::SendGetModulesTrust(
ModulePaths&& aModPaths,
const bool& aRunAtNormalPriority) -> RefPtr<GetModulesTrustPromise>
{
RefPtr<MozPromise<mozilla::Maybe<ModulesMapResult>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<ModulesMapResult>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendGetModulesTrust(std::move(aModPaths), std::move(aRunAtNormalPriority), [promise__](mozilla::Maybe<ModulesMapResult>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
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::Reply_GetModulesTrust__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_GetModulesTrust", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
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_StartWindowsUtilsService__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_StartWindowsUtilsService", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::dom::PWindowsUtilsChild>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::dom::PWindowsUtilsChild>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::dom::PWindowsUtilsChild>'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvStartWindowsUtilsService(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_StartWinFileDialogService__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_StartWinFileDialogService", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::widget::filedialog::PWinFileDialogChild>'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvStartWinFileDialogService(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_GetUntrustedModulesData__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_GetUntrustedModulesData", OTHER);
int32_t id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PUtilityProcess::Reply_GetUntrustedModulesData(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
GetUntrustedModulesDataResolver resolver = [resolver__ = std::move(resolver__)](mozilla::Maybe<UntrustedModulesData>&& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), std::move(aParam));
// Sentinel = 'data'
((&(writer__)))->WriteSentinel(67109275);
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))->RecvGetUntrustedModulesData(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_UnblockUntrustedModulesThread__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_UnblockUntrustedModulesThread", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<UtilityProcessChild*>(this))->RecvUnblockUntrustedModulesThread();
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