//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PSerialPortParent.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/SerialPortIPCTypes.h"
#include "mozilla/dom/SerialPortParent.h"
#include "mozilla/ipc/DataPipe.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 {
auto PSerialPortParent::Recv__delete__() -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
auto PSerialPortParent::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PSerialPortParent::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PSerialPortParent::PSerialPortParent() :
mozilla::ipc::IToplevelProtocol("PSerialPortParent", kProtocolId, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PSerialPortParent);
}
PSerialPortParent::~PSerialPortParent()
{
MOZ_COUNT_DTOR(PSerialPortParent);
}
auto PSerialPortParent::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PSerialPortParent'");
AddRef();
}
auto PSerialPortParent::ActorDealloc() -> void
{
Release();
}
auto PSerialPortParent::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PSerialPortParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PSerialPortParent::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PSerialPortParent::SendConnected() -> bool
{
UniquePtr<IPC::Message> msg__ = PSerialPort::Msg_Connected(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Connected", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSerialPortParent::SendDisconnected() -> bool
{
UniquePtr<IPC::Message> msg__ = PSerialPort::Msg_Disconnected(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Disconnected", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSerialPortParent::DeallocManagee(
mozilla::ipc::ProtocolId aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PSerialPortParent::OnMessageReceived(const Message& msg__) -> PSerialPortParent::Result
{
switch (msg__.type()) {
case PSerialPort::Msg_Open__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Open", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__options = IPC::ReadParam<IPCSerialOptions>((&(reader__)));
if (!maybe__options) {
FatalError("Error deserializing 'IPCSerialOptions'");
return MsgValueError;
}
auto& options = *maybe__options;
// Sentinel = 'options'
if ((!(((&(reader__)))->ReadSentinel(204735245)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IPCSerialOptions'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PSerialPort::Reply_Open(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
OpenResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvOpen(std::move(options), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_Close__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Close", OTHER);
mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PSerialPort::Reply_Close(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
CloseResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvClose(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_SetSignals__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_SetSignals", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__signals = IPC::ReadParam<IPCSerialOutputSignals>((&(reader__)));
if (!maybe__signals) {
FatalError("Error deserializing 'IPCSerialOutputSignals'");
return MsgValueError;
}
auto& signals = *maybe__signals;
// Sentinel = 'signals'
if ((!(((&(reader__)))->ReadSentinel(197853938)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IPCSerialOutputSignals'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PSerialPort::Reply_SetSignals(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
SetSignalsResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvSetSignals(std::move(signals), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_GetSignals__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_GetSignals", OTHER);
mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PSerialPort::Reply_GetSignals(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
GetSignalsResolver resolver = [resolver__ = std::move(resolver__)](std::tuple<const nsresult&, const IPCSerialInputSignals&> aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), std::get<0>(aParam));
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
IPC::WriteParam((&(writer__)), std::get<1>(aParam));
// Sentinel = 'signals'
((&(writer__)))->WriteSentinel(197853938);
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvGetSignals(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_Drain__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Drain", OTHER);
mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PSerialPort::Reply_Drain(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
DrainResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvDrain(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_Flush__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Flush", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__receive = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__receive) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& receive = *maybe__receive;
// Sentinel = 'receive'
if ((!(((&(reader__)))->ReadSentinel(194118372)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::ActorId id__ = MSG_ROUTING_CONTROL;
UniquePtr<IPC::Message> reply__(PSerialPort::Reply_Flush(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
FlushResolver resolver = [resolver__ = std::move(resolver__)](const nsresult& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'result'
((&(writer__)))->WriteSentinel(153223840);
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvFlush(std::move(receive), std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_AttachReadPipe__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_AttachReadPipe", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__readPipeSender = IPC::ReadParam<RefPtr<DataPipeSender>>((&(reader__)));
if (!maybe__readPipeSender) {
FatalError("Error deserializing 'DataPipeSender'");
return MsgValueError;
}
auto& readPipeSender = *maybe__readPipeSender;
// Sentinel = 'readPipeSender'
if ((!(((&(reader__)))->ReadSentinel(694289804)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'DataPipeSender'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvAttachReadPipe(readPipeSender);
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_AttachWritePipe__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_AttachWritePipe", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__writePipeReceiver = IPC::ReadParam<RefPtr<DataPipeReceiver>>((&(reader__)));
if (!maybe__writePipeReceiver) {
FatalError("Error deserializing 'DataPipeReceiver'");
return MsgValueError;
}
auto& writePipeReceiver = *maybe__writePipeReceiver;
// Sentinel = 'writePipeReceiver'
if ((!(((&(reader__)))->ReadSentinel(1053296367)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'DataPipeReceiver'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvAttachWritePipe(writePipeReceiver);
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_UpdateSharingState__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_UpdateSharingState", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__connected = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__connected) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& connected = *maybe__connected;
// Sentinel = 'connected'
if ((!(((&(reader__)))->ReadSentinel(312542132)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvUpdateSharingState(std::move(connected));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSerialPort::Msg_Clone__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSerialPort", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSerialPortParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSerialPort::Msg_Clone", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aEndpoint = IPC::ReadParam<Endpoint<::mozilla::dom::PSerialPortParent>>((&(reader__)));
if (!maybe__aEndpoint) {
FatalError("Error deserializing 'Endpoint<::mozilla::dom::PSerialPortParent>'");
return MsgValueError;
}
auto& aEndpoint = *maybe__aEndpoint;
// Sentinel = 'aEndpoint'
if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'Endpoint<::mozilla::dom::PSerialPortParent>'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<SerialPortParent*>(this))->RecvClone(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 PSerialPortParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PSerialPortParent::Result
{
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PSerialPortParent*>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
// Sentinel = 'PSerialPort'
(aWriter)->WriteSentinel(419169366);
}
auto ParamTraits<::mozilla::dom::PSerialPortParent*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
if (!maybe__actor) {
aReader->FatalError("Error deserializing managed PSerialPort actor");
return {};
}
auto& actor = *maybe__actor;
// Sentinel = 'PSerialPort'
if ((!((aReader)->ReadSentinel(419169366)))) {
mozilla::ipc::SentinelReadError("Error deserializing managed PSerialPort actor");
return {};
}
if (actor && actor->GetProtocolId() != PSerialPortMsgStart) {
aReader->FatalError("Unexpected actor type (expected PSerialPort)");
return {};
}
return static_cast<::mozilla::dom::PSerialPortParent*>(actor);
}
} // namespace IPC