Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/PRemoteSpellcheckEngineChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/ProfilerMarkers.h"
#include "mozilla/RemoteSpellCheckEngineChild.h"
#include "mozilla/RemoteSpellCheckEngineParent.h"
#include "mozilla/dom/PContentChild.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 {
MOZ_IMPLICIT PRemoteSpellcheckEngineChild::PRemoteSpellcheckEngineChild() :
mozilla::ipc::IProtocol(PRemoteSpellcheckEngineMsgStart, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PRemoteSpellcheckEngineChild);
}
PRemoteSpellcheckEngineChild::~PRemoteSpellcheckEngineChild()
{
MOZ_COUNT_DTOR(PRemoteSpellcheckEngineChild);
}
auto PRemoteSpellcheckEngineChild::ActorAlloc() -> void
{
}
auto PRemoteSpellcheckEngineChild::ActorDealloc() -> void
{
if (Manager()) {
Manager()->DeallocManagee(PRemoteSpellcheckEngineMsgStart, this);
}
}
auto PRemoteSpellcheckEngineChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PRemoteSpellcheckEngineChild::Manager() const -> PContentChild*
{
return static_cast<PContentChild*>(IProtocol::Manager());
}
auto PRemoteSpellcheckEngineChild::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PRemoteSpellcheckEngineChild::Send__delete__(PRemoteSpellcheckEngineChild* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PRemoteSpellcheckEngine::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PRemoteSpellcheckEngineChild::SendCheckAsync(
mozilla::Span<nsString const> aWord,
mozilla::ipc::ResolveCallback<nsTArray<bool>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PRemoteSpellcheckEngine::Msg_CheckAsync(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aWord);
// Sentinel = 'aWord'
((&(writer__)))->WriteSentinel(98238974);
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_CheckAsync", OTHER);
ChannelSend(std::move(msg__), PRemoteSpellcheckEngine::Reply_CheckAsync__ID, std::move(aResolve), std::move(aReject));
return;
}
auto PRemoteSpellcheckEngineChild::SendCheckAsync(mozilla::Span<nsString const> aWord) -> RefPtr<CheckAsyncPromise>
{
RefPtr<MozPromise<nsTArray<bool>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<nsTArray<bool>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendCheckAsync(std::move(aWord), [promise__](nsTArray<bool>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PRemoteSpellcheckEngineChild::SendSetDictionary(
const nsACString& aDictionary,
bool* success) -> bool
{
UniquePtr<IPC::Message> msg__ = PRemoteSpellcheckEngine::Msg_SetDictionary(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aDictionary);
// Sentinel = 'aDictionary'
((&(writer__)))->WriteSentinel(430703736);
UniquePtr<Message> reply__;
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_SetDictionary", OTHER);
bool sendok__ = false;
{
AUTO_PROFILER_TRACING_MARKER("Sync IPC", "PRemoteSpellcheckEngine::Msg_SetDictionary", IPC);
sendok__ = ChannelSend(std::move(msg__), (&(reply__)));
}
if ((!(sendok__))) {
return false;
}
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
IPC::MessageReader reader__{
(*(reply__)),
this};
auto maybe__success__reply = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__success__reply) {
FatalError("Error deserializing 'bool'");
return false;
}
auto& success__reply = *maybe__success__reply;
// Sentinel = 'success'
if ((!(((&(reader__)))->ReadSentinel(200082170)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return false;
}
(*(success)) = std::move(success__reply);
reader__.EndRead();
return true;
}
auto PRemoteSpellcheckEngineChild::SendSetDictionaries(
mozilla::Span<nsCString const> aDictionaries,
mozilla::ipc::ResolveCallback<bool>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PRemoteSpellcheckEngine::Msg_SetDictionaries(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aDictionaries);
// Sentinel = 'aDictionaries'
((&(writer__)))->WriteSentinel(598279488);
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_SetDictionaries", OTHER);
ChannelSend(std::move(msg__), PRemoteSpellcheckEngine::Reply_SetDictionaries__ID, std::move(aResolve), std::move(aReject));
return;
}
auto PRemoteSpellcheckEngineChild::SendSetDictionaries(mozilla::Span<nsCString const> aDictionaries) -> RefPtr<SetDictionariesPromise>
{
RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendSetDictionaries(std::move(aDictionaries), [promise__](bool&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PRemoteSpellcheckEngineChild::SendSuggest(
const nsAString& aWord,
const uint32_t& aCount,
mozilla::ipc::ResolveCallback<nsTArray<nsString>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PRemoteSpellcheckEngine::Msg_Suggest(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aWord);
// Sentinel = 'aWord'
((&(writer__)))->WriteSentinel(98238974);
IPC::WriteParam((&(writer__)), aCount);
// Sentinel = 'aCount'
((&(writer__)))->WriteSentinel(134611563);
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_Suggest", OTHER);
ChannelSend(std::move(msg__), PRemoteSpellcheckEngine::Reply_Suggest__ID, std::move(aResolve), std::move(aReject));
return;
}
auto PRemoteSpellcheckEngineChild::SendSuggest(
const nsAString& aWord,
const uint32_t& aCount) -> RefPtr<SuggestPromise>
{
RefPtr<MozPromise<nsTArray<nsString>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<nsTArray<nsString>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendSuggest(std::move(aWord), std::move(aCount), [promise__](nsTArray<nsString>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PRemoteSpellcheckEngineChild::SendSetDictionaryFromList(
mozilla::Span<nsCString const> aList,
mozilla::ipc::ResolveCallback<std::tuple<bool, nsCString>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PRemoteSpellcheckEngine::Msg_SetDictionaryFromList(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aList);
// Sentinel = 'aList'
((&(writer__)))->WriteSentinel(95355390);
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_SetDictionaryFromList", OTHER);
ChannelSend(std::move(msg__), PRemoteSpellcheckEngine::Reply_SetDictionaryFromList__ID, std::move(aResolve), std::move(aReject));
return;
}
auto PRemoteSpellcheckEngineChild::SendSetDictionaryFromList(mozilla::Span<nsCString const> aList) -> RefPtr<SetDictionaryFromListPromise>
{
RefPtr<MozPromise<std::tuple<bool, nsCString>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<bool, nsCString>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendSetDictionaryFromList(std::move(aList), [promise__](std::tuple<bool, nsCString>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PRemoteSpellcheckEngineChild::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PRemoteSpellcheckEngineChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PRemoteSpellcheckEngineChild::OnMessageReceived(const Message& msg__) -> PRemoteSpellcheckEngineChild::Result
{
switch (msg__.type()) {
case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
return MsgProcessed;
}
case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
{
if (!mAwaitingManagedEndpointBind) {
NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
return MsgNotAllowed;
}
mAwaitingManagedEndpointBind = false;
this->ActorDisconnected(ManagedEndpointDropped);
return MsgProcessed;
}
case PRemoteSpellcheckEngine::Reply___delete____ID:
{
return MsgProcessed;
}
case PRemoteSpellcheckEngine::Reply_CheckAsync__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_CheckAsync", OTHER);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<nsTArray<bool>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__aIsMisspelled = IPC::ReadParam<nsTArray<bool>>((&(reader__)));
if (!maybe__aIsMisspelled) {
FatalError("Error deserializing 'bool[]'");
return MsgValueError;
}
auto& aIsMisspelled = *maybe__aIsMisspelled;
// Sentinel = 'aIsMisspelled'
if ((!(((&(reader__)))->ReadSentinel(595723568)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool[]'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(aIsMisspelled));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
case PRemoteSpellcheckEngine::Reply_SetDictionaries__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_SetDictionaries", OTHER);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<bool> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__success = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__success) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& success = *maybe__success;
// Sentinel = 'success'
if ((!(((&(reader__)))->ReadSentinel(200082170)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(success));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
case PRemoteSpellcheckEngine::Reply_Suggest__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_Suggest", OTHER);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<nsTArray<nsString>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__aSuggestions = IPC::ReadParam<nsTArray<nsString>>((&(reader__)));
if (!maybe__aSuggestions) {
FatalError("Error deserializing 'nsString[]'");
return MsgValueError;
}
auto& aSuggestions = *maybe__aSuggestions;
// Sentinel = 'aSuggestions'
if ((!(((&(reader__)))->ReadSentinel(529204477)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString[]'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::move(aSuggestions));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
case PRemoteSpellcheckEngine::Reply_SetDictionaryFromList__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteSpellcheckEngine", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteSpellcheckEngineChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteSpellcheckEngine::Msg_SetDictionaryFromList", OTHER);
IPC::MessageReader reader__{
msg__,
this};
bool resolve__ = false;
if (!IPC::ReadParam(&reader__, &resolve__)) {
FatalError("Error deserializing bool");
return MsgValueError;
}
UniquePtr<MessageChannel::UntypedCallbackHolder> untypedCallback =
GetIPCChannel()->PopCallback(msg__, Id());
typedef MessageChannel::CallbackHolder<std::tuple<bool, nsCString>> CallbackHolder;
auto* callback = static_cast<CallbackHolder*>(untypedCallback.get());
if (!callback) {
FatalError("Error unknown callback");
return MsgProcessingError;
}
if (resolve__) {
auto maybe__aSuccess = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__aSuccess) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aSuccess = *maybe__aSuccess;
// Sentinel = 'aSuccess'
if ((!(((&(reader__)))->ReadSentinel(236323643)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
auto maybe__aDictionary = IPC::ReadParam<nsCString>((&(reader__)));
if (!maybe__aDictionary) {
FatalError("Error deserializing 'nsCString'");
return MsgValueError;
}
auto& aDictionary = *maybe__aDictionary;
// Sentinel = 'aDictionary'
if ((!(((&(reader__)))->ReadSentinel(430703736)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
return MsgValueError;
}
reader__.EndRead();
callback->Resolve(std::make_tuple(std::move(aSuccess), std::move(aDictionary)));
} else {
ResponseRejectReason reason__{};
if (!IPC::ReadParam(&reader__, &reason__)) {
FatalError("Error deserializing ResponseRejectReason");
return MsgValueError;
}
reader__.EndRead();
callback->Reject(std::move(reason__));
}
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PRemoteSpellcheckEngineChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PRemoteSpellcheckEngineChild::Result
{
return MsgNotKnown;
}
auto PRemoteSpellcheckEngineChild::DoomSubtree() -> void
{
SetDoomed();
}
auto PRemoteSpellcheckEngineChild::PeekManagedActor() -> IProtocol*
{
return nullptr;
}
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::PRemoteSpellcheckEngineChild*>::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::PRemoteSpellcheckEngineChild*>::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, "PRemoteSpellcheckEngine", PRemoteSpellcheckEngineMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::PRemoteSpellcheckEngineChild*>(actor.ref());
}
return {};
}
} // namespace IPC