Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/_ipdltest/PTestDataStructuresChild.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/_ipdltest/PTestDataStructuresSubChild.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 _ipdltest {
auto PTestDataStructuresChild::RecvPTestDataStructuresSubConstructor(
PTestDataStructuresSubChild* actor,
const int& i) -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
auto PTestDataStructuresChild::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PTestDataStructuresChild::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PTestDataStructuresChild::PTestDataStructuresChild() :
mozilla::ipc::IToplevelProtocol("PTestDataStructuresChild", kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PTestDataStructuresChild);
}
PTestDataStructuresChild::~PTestDataStructuresChild()
{
MOZ_COUNT_DTOR(PTestDataStructuresChild);
}
auto PTestDataStructuresChild::ActorAlloc() -> void
{
AddRef();
}
auto PTestDataStructuresChild::ActorDealloc() -> void
{
Release();
}
auto PTestDataStructuresChild::ManagedPTestDataStructuresSubChild(nsTArray<PTestDataStructuresSubChild*>& aArr) const -> void
{
mManagedPTestDataStructuresSubChild.ToArray(aArr);
}
auto PTestDataStructuresChild::ManagedPTestDataStructuresSubChild() const -> const ManagedContainer<PTestDataStructuresSubChild>&
{
return mManagedPTestDataStructuresSubChild;
}
auto PTestDataStructuresChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
static constexpr ::mozilla::ipc::ProtocolId sIds[] = {
PTestDataStructuresSubMsgStart
};
return sIds;
}
auto PTestDataStructuresChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
case PTestDataStructuresSubMsgStart:
return (&(mManagedPTestDataStructuresSubChild));
default:
return nullptr;
}
}
auto PTestDataStructuresChild::OpenPTestDataStructuresSubEndpoint(PTestDataStructuresSubChild* aActor) -> ManagedEndpoint<PTestDataStructuresSubParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PTestDataStructuresSubChild actor");
return ManagedEndpoint<PTestDataStructuresSubParent>();
}
if (!aActor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PTestDataStructuresSubChild actor");
return ManagedEndpoint<PTestDataStructuresSubParent>();
}
// Mark our actor as awaiting the other side to be bound. This will
// be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
// received.
aActor->mAwaitingManagedEndpointBind = true;
return ManagedEndpoint<PTestDataStructuresSubParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PTestDataStructuresChild::BindPTestDataStructuresSubEndpoint(
ManagedEndpoint<PTestDataStructuresSubChild> aEndpoint,
PTestDataStructuresSubChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}
auto PTestDataStructuresChild::SendTestArrayOfInt(
mozilla::Span<int const> i1,
nsTArray<int>* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestArrayOfInt(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestArrayOfInt", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestArrayOfInt", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<nsTArray<int>>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'int[]'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'int[]'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestArrayOfActor(
mozilla::Span<mozilla::NotNull<PTestDataStructuresSubChild*> const> i1,
nsTArray<mozilla::NotNull<PTestDataStructuresSubChild*>>* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestArrayOfActor(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestArrayOfActor", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestArrayOfActor", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<nsTArray<mozilla::NotNull<PTestDataStructuresSubChild*>>>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'NotNull<PTestDataStructuresSub>[]'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'NotNull<PTestDataStructuresSub>[]'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestUnion(
const IntDouble& i1,
const IntDouble& i2,
IntDouble* o1,
IntDouble* o2) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestUnion(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
IPC::WriteParam((&(writer__)), i2);
// Sentinel = 'i2'
((&(writer__)))->WriteSentinel(17170588);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestUnion", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestUnion", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<IntDouble>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'IntDouble'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDouble'");
return false;
}
auto maybe__o2__reply = IPC::ReadParam<IntDouble>((&(reader__)));
if (!maybe__o2__reply) {
FatalError("Error deserializing 'IntDouble'");
return false;
}
auto& o2__reply = *maybe__o2__reply;
// Sentinel = 'o2'
if ((!(((&(reader__)))->ReadSentinel(17957026)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDouble'");
return false;
}
(*(o1)) = std::move(o1__reply);
(*(o2)) = std::move(o2__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestArrayOfUnion(
mozilla::Span<IntDouble const> i1,
nsTArray<IntDouble>* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestArrayOfUnion(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestArrayOfUnion", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestArrayOfUnion", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<nsTArray<IntDouble>>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'IntDouble[]'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDouble[]'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestUnionWithArray(
const IntDoubleArrays& i1,
const IntDoubleArrays& i2,
const IntDoubleArrays& i3,
IntDoubleArrays* o1,
IntDoubleArrays* o2,
IntDoubleArrays* o3) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestUnionWithArray(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
IPC::WriteParam((&(writer__)), i2);
// Sentinel = 'i2'
((&(writer__)))->WriteSentinel(17170588);
IPC::WriteParam((&(writer__)), i3);
// Sentinel = 'i3'
((&(writer__)))->WriteSentinel(17236125);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestUnionWithArray", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestUnionWithArray", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<IntDoubleArrays>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'IntDoubleArrays'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDoubleArrays'");
return false;
}
auto maybe__o2__reply = IPC::ReadParam<IntDoubleArrays>((&(reader__)));
if (!maybe__o2__reply) {
FatalError("Error deserializing 'IntDoubleArrays'");
return false;
}
auto& o2__reply = *maybe__o2__reply;
// Sentinel = 'o2'
if ((!(((&(reader__)))->ReadSentinel(17957026)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDoubleArrays'");
return false;
}
auto maybe__o3__reply = IPC::ReadParam<IntDoubleArrays>((&(reader__)));
if (!maybe__o3__reply) {
FatalError("Error deserializing 'IntDoubleArrays'");
return false;
}
auto& o3__reply = *maybe__o3__reply;
// Sentinel = 'o3'
if ((!(((&(reader__)))->ReadSentinel(18022563)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDoubleArrays'");
return false;
}
(*(o1)) = std::move(o1__reply);
(*(o2)) = std::move(o2__reply);
(*(o3)) = std::move(o3__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestArrayOfUnionWithArray(
mozilla::Span<IntDoubleArrays const> i1,
nsTArray<IntDoubleArrays>* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestArrayOfUnionWithArray(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestArrayOfUnionWithArray", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestArrayOfUnionWithArray", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<nsTArray<IntDoubleArrays>>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'IntDoubleArrays[]'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IntDoubleArrays[]'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestStructWithActor(
const ActorWrapper& a1,
ActorWrapper* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestStructWithActor(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), a1);
// Sentinel = 'a1'
((&(writer__)))->WriteSentinel(16056467);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestStructWithActor", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestStructWithActor", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<ActorWrapper>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'ActorWrapper'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ActorWrapper'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestUnionWithActors(
const Actors& i1,
const Actors& i2,
const Actors& i3,
Actors* o1,
Actors* o2,
Actors* o3) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestUnionWithActors(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
IPC::WriteParam((&(writer__)), i2);
// Sentinel = 'i2'
((&(writer__)))->WriteSentinel(17170588);
IPC::WriteParam((&(writer__)), i3);
// Sentinel = 'i3'
((&(writer__)))->WriteSentinel(17236125);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestUnionWithActors", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestUnionWithActors", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<Actors>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'Actors'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Actors'");
return false;
}
auto maybe__o2__reply = IPC::ReadParam<Actors>((&(reader__)));
if (!maybe__o2__reply) {
FatalError("Error deserializing 'Actors'");
return false;
}
auto& o2__reply = *maybe__o2__reply;
// Sentinel = 'o2'
if ((!(((&(reader__)))->ReadSentinel(17957026)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Actors'");
return false;
}
auto maybe__o3__reply = IPC::ReadParam<Actors>((&(reader__)));
if (!maybe__o3__reply) {
FatalError("Error deserializing 'Actors'");
return false;
}
auto& o3__reply = *maybe__o3__reply;
// Sentinel = 'o3'
if ((!(((&(reader__)))->ReadSentinel(18022563)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Actors'");
return false;
}
(*(o1)) = std::move(o1__reply);
(*(o2)) = std::move(o2__reply);
(*(o3)) = std::move(o3__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestArrayOfUnionWithActors(
mozilla::Span<Actors const> i1,
nsTArray<Actors>* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestArrayOfUnionWithActors(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestArrayOfUnionWithActors", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestArrayOfUnionWithActors", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<nsTArray<Actors>>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'Actors[]'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Actors[]'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestUnions(
const Unions& i1,
const Unions& i2,
const Unions& i3,
const Unions& i4,
Unions* o1,
Unions* o2,
Unions* o3,
Unions* o4) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestUnions(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
IPC::WriteParam((&(writer__)), i2);
// Sentinel = 'i2'
((&(writer__)))->WriteSentinel(17170588);
IPC::WriteParam((&(writer__)), i3);
// Sentinel = 'i3'
((&(writer__)))->WriteSentinel(17236125);
IPC::WriteParam((&(writer__)), i4);
// Sentinel = 'i4'
((&(writer__)))->WriteSentinel(17301662);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestUnions", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestUnions", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<Unions>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'Unions'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Unions'");
return false;
}
auto maybe__o2__reply = IPC::ReadParam<Unions>((&(reader__)));
if (!maybe__o2__reply) {
FatalError("Error deserializing 'Unions'");
return false;
}
auto& o2__reply = *maybe__o2__reply;
// Sentinel = 'o2'
if ((!(((&(reader__)))->ReadSentinel(17957026)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Unions'");
return false;
}
auto maybe__o3__reply = IPC::ReadParam<Unions>((&(reader__)));
if (!maybe__o3__reply) {
FatalError("Error deserializing 'Unions'");
return false;
}
auto& o3__reply = *maybe__o3__reply;
// Sentinel = 'o3'
if ((!(((&(reader__)))->ReadSentinel(18022563)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Unions'");
return false;
}
auto maybe__o4__reply = IPC::ReadParam<Unions>((&(reader__)));
if (!maybe__o4__reply) {
FatalError("Error deserializing 'Unions'");
return false;
}
auto& o4__reply = *maybe__o4__reply;
// Sentinel = 'o4'
if ((!(((&(reader__)))->ReadSentinel(18088100)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Unions'");
return false;
}
(*(o1)) = std::move(o1__reply);
(*(o2)) = std::move(o2__reply);
(*(o3)) = std::move(o3__reply);
(*(o4)) = std::move(o4__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestArrayOfUnions(
mozilla::Span<Unions const> i1,
nsTArray<Unions>* o1) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestArrayOfUnions(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestArrayOfUnions", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestArrayOfUnions", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<nsTArray<Unions>>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'Unions[]'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Unions[]'");
return false;
}
(*(o1)) = std::move(o1__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestStruct(
const SIntDouble& i,
SIntDouble* o) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestStruct(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i);
// Sentinel = 'i'
((&(writer__)))->WriteSentinel(6946922);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestStruct", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestStruct", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o__reply = IPC::ReadParam<SIntDouble>((&(reader__)));
if (!maybe__o__reply) {
FatalError("Error deserializing 'SIntDouble'");
return false;
}
auto& o__reply = *maybe__o__reply;
// Sentinel = 'o'
if ((!(((&(reader__)))->ReadSentinel(7340144)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'SIntDouble'");
return false;
}
(*(o)) = std::move(o__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestStructWithArrays(
const SIntDoubleArrays& i,
SIntDoubleArrays* o) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestStructWithArrays(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i);
// Sentinel = 'i'
((&(writer__)))->WriteSentinel(6946922);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestStructWithArrays", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestStructWithArrays", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o__reply = IPC::ReadParam<SIntDoubleArrays>((&(reader__)));
if (!maybe__o__reply) {
FatalError("Error deserializing 'SIntDoubleArrays'");
return false;
}
auto& o__reply = *maybe__o__reply;
// Sentinel = 'o'
if ((!(((&(reader__)))->ReadSentinel(7340144)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'SIntDoubleArrays'");
return false;
}
(*(o)) = std::move(o__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestStructWithActors(
const SActors& i,
SActors* o) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestStructWithActors(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i);
// Sentinel = 'i'
((&(writer__)))->WriteSentinel(6946922);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestStructWithActors", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestStructWithActors", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o__reply = IPC::ReadParam<SActors>((&(reader__)));
if (!maybe__o__reply) {
FatalError("Error deserializing 'SActors'");
return false;
}
auto& o__reply = *maybe__o__reply;
// Sentinel = 'o'
if ((!(((&(reader__)))->ReadSentinel(7340144)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'SActors'");
return false;
}
(*(o)) = std::move(o__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestStructs(
const Structs& i,
Structs* o) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestStructs(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i);
// Sentinel = 'i'
((&(writer__)))->WriteSentinel(6946922);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestStructs", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestStructs", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o__reply = IPC::ReadParam<Structs>((&(reader__)));
if (!maybe__o__reply) {
FatalError("Error deserializing 'Structs'");
return false;
}
auto& o__reply = *maybe__o__reply;
// Sentinel = 'o'
if ((!(((&(reader__)))->ReadSentinel(7340144)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Structs'");
return false;
}
(*(o)) = std::move(o__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestUnionWithStructs(
const WithStructs& i1,
const WithStructs& i2,
const WithStructs& i3,
const WithStructs& i4,
const WithStructs& i5,
WithStructs* o1,
WithStructs* o2,
WithStructs* o3,
WithStructs* o4,
WithStructs* o5) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestUnionWithStructs(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i1);
// Sentinel = 'i1'
((&(writer__)))->WriteSentinel(17105051);
IPC::WriteParam((&(writer__)), i2);
// Sentinel = 'i2'
((&(writer__)))->WriteSentinel(17170588);
IPC::WriteParam((&(writer__)), i3);
// Sentinel = 'i3'
((&(writer__)))->WriteSentinel(17236125);
IPC::WriteParam((&(writer__)), i4);
// Sentinel = 'i4'
((&(writer__)))->WriteSentinel(17301662);
IPC::WriteParam((&(writer__)), i5);
// Sentinel = 'i5'
((&(writer__)))->WriteSentinel(17367199);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestUnionWithStructs", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestUnionWithStructs", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o1__reply = IPC::ReadParam<WithStructs>((&(reader__)));
if (!maybe__o1__reply) {
FatalError("Error deserializing 'WithStructs'");
return false;
}
auto& o1__reply = *maybe__o1__reply;
// Sentinel = 'o1'
if ((!(((&(reader__)))->ReadSentinel(17891489)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'WithStructs'");
return false;
}
auto maybe__o2__reply = IPC::ReadParam<WithStructs>((&(reader__)));
if (!maybe__o2__reply) {
FatalError("Error deserializing 'WithStructs'");
return false;
}
auto& o2__reply = *maybe__o2__reply;
// Sentinel = 'o2'
if ((!(((&(reader__)))->ReadSentinel(17957026)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'WithStructs'");
return false;
}
auto maybe__o3__reply = IPC::ReadParam<WithStructs>((&(reader__)));
if (!maybe__o3__reply) {
FatalError("Error deserializing 'WithStructs'");
return false;
}
auto& o3__reply = *maybe__o3__reply;
// Sentinel = 'o3'
if ((!(((&(reader__)))->ReadSentinel(18022563)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'WithStructs'");
return false;
}
auto maybe__o4__reply = IPC::ReadParam<WithStructs>((&(reader__)));
if (!maybe__o4__reply) {
FatalError("Error deserializing 'WithStructs'");
return false;
}
auto& o4__reply = *maybe__o4__reply;
// Sentinel = 'o4'
if ((!(((&(reader__)))->ReadSentinel(18088100)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'WithStructs'");
return false;
}
auto maybe__o5__reply = IPC::ReadParam<WithStructs>((&(reader__)));
if (!maybe__o5__reply) {
FatalError("Error deserializing 'WithStructs'");
return false;
}
auto& o5__reply = *maybe__o5__reply;
// Sentinel = 'o5'
if ((!(((&(reader__)))->ReadSentinel(18153637)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'WithStructs'");
return false;
}
(*(o1)) = std::move(o1__reply);
(*(o2)) = std::move(o2__reply);
(*(o3)) = std::move(o3__reply);
(*(o4)) = std::move(o4__reply);
(*(o5)) = std::move(o5__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestStructWithUnions(
const WithUnions& i,
WithUnions* o) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestStructWithUnions(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), i);
// Sentinel = 'i'
((&(writer__)))->WriteSentinel(6946922);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestStructWithUnions", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestStructWithUnions", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__o__reply = IPC::ReadParam<WithUnions>((&(reader__)));
if (!maybe__o__reply) {
FatalError("Error deserializing 'WithUnions'");
return false;
}
auto& o__reply = *maybe__o__reply;
// Sentinel = 'o'
if ((!(((&(reader__)))->ReadSentinel(7340144)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'WithUnions'");
return false;
}
(*(o)) = std::move(o__reply);
reader__.EndRead();
return true;
}
auto PTestDataStructuresChild::SendTestUnionWithCxx(mozilla::Span<Op const> ops) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestUnionWithCxx(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), ops);
// Sentinel = 'ops'
((&(writer__)))->WriteSentinel(44237139);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestUnionWithCxx", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestUnionWithCxx", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
return true;
}
auto PTestDataStructuresChild::SendTestNsIntRegion(mozilla::Span<nsIntRegion const> ops) -> bool
{
UniquePtr<IPC::Message> msg__ = PTestDataStructures::Msg_TestNsIntRegion(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), ops);
// Sentinel = 'ops'
((&(writer__)))->WriteSentinel(44237139);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_TestNsIntRegion", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PTestDataStructures::Msg_TestNsIntRegion", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
return true;
}
auto PTestDataStructuresChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
switch (aProtocolId) {
default:
FatalError("unreached");
return;
}
}
auto PTestDataStructuresChild::OnMessageReceived(const Message& msg__) -> PTestDataStructuresChild::Result
{
int32_t route__ = msg__.routing_id();
if (MSG_ROUTING_CONTROL != route__) {
IProtocol* routed__ = Lookup(route__);
if (!routed__ || !routed__->GetLifecycleProxy()) {
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Ignored message for dead actor",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eSending);
}
return MsgProcessed;
}
RefPtr<mozilla::ipc::ActorLifecycleProxy> proxy__ =
routed__->GetLifecycleProxy();
return proxy__->Get()->OnMessageReceived(msg__);
}
switch (msg__.type()) {
case PTestDataStructures::Msg_PTestDataStructuresSubConstructor__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_PTestDataStructuresSubConstructor", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__handle__ = IPC::ReadParam<ActorHandle>((&(reader__)));
if (!maybe__handle__) {
FatalError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
auto& handle__ = *maybe__handle__;
// Sentinel = 'actor'
if ((!(((&(reader__)))->ReadSentinel(102892058)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ActorHandle'");
return MsgValueError;
}
auto maybe__i = IPC::ReadParam<int>((&(reader__)));
if (!maybe__i) {
FatalError("Error deserializing 'int'");
return MsgValueError;
}
auto& i = *maybe__i;
// Sentinel = 'i'
if ((!(((&(reader__)))->ReadSentinel(6946922)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'int'");
return MsgValueError;
}
reader__.EndRead();
RefPtr<PTestDataStructuresSubChild> actor = (this)->AllocPTestDataStructuresSubChild(i);
if (!actor) {
NS_WARNING("Cannot bind null PTestDataStructuresSubChild actor");
return MsgValueError;
}
if (!actor->SetManagerAndRegister(this, (handle__).mId)) {
NS_WARNING("Failed to bind PTestDataStructuresSubChild actor");
return MsgValueError;
}
mozilla::ipc::IPCResult __ok = (this)->RecvPTestDataStructuresSubConstructor(actor, std::move(i));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PTestDataStructures::Msg_Start__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PTestDataStructures", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PTestDataStructuresChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PTestDataStructures::Msg_Start", OTHER);
mozilla::ipc::IPCResult __ok = (this)->RecvStart();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PTestDataStructures::Reply___delete____ID:
{
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 PTestDataStructuresChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PTestDataStructuresChild::Result
{
int32_t route__ = msg__.routing_id();
if (MSG_ROUTING_CONTROL != route__) {
IProtocol* routed__ = Lookup(route__);
if (!routed__ || !routed__->GetLifecycleProxy()) {
return MsgRouteError;
}
RefPtr<mozilla::ipc::ActorLifecycleProxy> proxy__ =
routed__->GetLifecycleProxy();
return proxy__->Get()->OnMessageReceived(msg__, reply__);
}
return MsgNotKnown;
}
} // namespace _ipdltest
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::_ipdltest::PTestDataStructuresChild*>::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::_ipdltest::PTestDataStructuresChild*>::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, "PTestDataStructures", PTestDataStructuresMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::_ipdltest::PTestDataStructuresChild*>(actor.ref());
}
return {};
}
} // namespace IPC