Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/quota/PQuotaTestChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/dom/quota/QuotaTestChild.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 dom {
namespace quota {
auto PQuotaTestChild::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PQuotaTestChild::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PQuotaTestChild::PQuotaTestChild() :
mozilla::ipc::IToplevelProtocol("PQuotaTestChild", kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PQuotaTestChild);
}
PQuotaTestChild::~PQuotaTestChild()
{
MOZ_COUNT_DTOR(PQuotaTestChild);
}
auto PQuotaTestChild::ActorAlloc() -> void
{
AddRef();
}
auto PQuotaTestChild::ActorDealloc() -> void
{
Release();
}
auto PQuotaTestChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PQuotaTestChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PQuotaTestChild::SendTry_Success_CustomErr_QmIpcFail(bool* tryDidNotReturn) -> bool
{
UniquePtr<IPC::Message> msg__ = PQuotaTest::Msg_Try_Success_CustomErr_QmIpcFail(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PQuotaTest::Msg_Try_Success_CustomErr_QmIpcFail", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PQuotaTest::Msg_Try_Success_CustomErr_QmIpcFail", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__tryDidNotReturn__reply = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__tryDidNotReturn__reply) {
FatalError("Error deserializing 'bool'");
return false;
}
auto& tryDidNotReturn__reply = *maybe__tryDidNotReturn__reply;
// Sentinel = 'tryDidNotReturn'
if ((!(((&(reader__)))->ReadSentinel(815728162)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return false;
}
(*(tryDidNotReturn)) = std::move(tryDidNotReturn__reply);
reader__.EndRead();
return true;
}
auto PQuotaTestChild::SendTry_Success_CustomErr_IpcFail(bool* tryDidNotReturn) -> bool
{
UniquePtr<IPC::Message> msg__ = PQuotaTest::Msg_Try_Success_CustomErr_IpcFail(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PQuotaTest::Msg_Try_Success_CustomErr_IpcFail", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PQuotaTest::Msg_Try_Success_CustomErr_IpcFail", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__tryDidNotReturn__reply = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__tryDidNotReturn__reply) {
FatalError("Error deserializing 'bool'");
return false;
}
auto& tryDidNotReturn__reply = *maybe__tryDidNotReturn__reply;
// Sentinel = 'tryDidNotReturn'
if ((!(((&(reader__)))->ReadSentinel(815728162)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return false;
}
(*(tryDidNotReturn)) = std::move(tryDidNotReturn__reply);
reader__.EndRead();
return true;
}
auto PQuotaTestChild::SendTryInspect_Success_CustomErr_QmIpcFail(bool* tryDidNotReturn) -> bool
{
UniquePtr<IPC::Message> msg__ = PQuotaTest::Msg_TryInspect_Success_CustomErr_QmIpcFail(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PQuotaTest::Msg_TryInspect_Success_CustomErr_QmIpcFail", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PQuotaTest::Msg_TryInspect_Success_CustomErr_QmIpcFail", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__tryDidNotReturn__reply = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__tryDidNotReturn__reply) {
FatalError("Error deserializing 'bool'");
return false;
}
auto& tryDidNotReturn__reply = *maybe__tryDidNotReturn__reply;
// Sentinel = 'tryDidNotReturn'
if ((!(((&(reader__)))->ReadSentinel(815728162)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return false;
}
(*(tryDidNotReturn)) = std::move(tryDidNotReturn__reply);
reader__.EndRead();
return true;
}
auto PQuotaTestChild::SendTryInspect_Success_CustomErr_IpcFail(bool* tryDidNotReturn) -> bool
{
UniquePtr<IPC::Message> msg__ = PQuotaTest::Msg_TryInspect_Success_CustomErr_IpcFail(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PQuotaTest::Msg_TryInspect_Success_CustomErr_IpcFail", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PQuotaTest::Msg_TryInspect_Success_CustomErr_IpcFail", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PQuotaTest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PQuotaTestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__tryDidNotReturn__reply = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__tryDidNotReturn__reply) {
FatalError("Error deserializing 'bool'");
return false;
}
auto& tryDidNotReturn__reply = *maybe__tryDidNotReturn__reply;
// Sentinel = 'tryDidNotReturn'
if ((!(((&(reader__)))->ReadSentinel(815728162)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return false;
}
(*(tryDidNotReturn)) = std::move(tryDidNotReturn__reply);
reader__.EndRead();
return true;
}
auto PQuotaTestChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PQuotaTestChild::OnMessageReceived(const Message& msg__) -> PQuotaTestChild::Result
{
switch (msg__.type()) {
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 PQuotaTestChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PQuotaTestChild::Result
{
return MsgNotKnown;
}
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::PQuotaTestChild*>::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::dom::quota::PQuotaTestChild*>::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, "PQuotaTest", PQuotaTestMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::quota::PQuotaTestChild*>(actor.ref());
}
return {};
}
} // namespace IPC