Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PSpeechSynthesisRequestChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/PSpeechSynthesisChild.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 {
MOZ_IMPLICIT PSpeechSynthesisRequestChild::PSpeechSynthesisRequestChild() :
mozilla::ipc::IProtocol(PSpeechSynthesisRequestMsgStart, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PSpeechSynthesisRequestChild);
}
PSpeechSynthesisRequestChild::~PSpeechSynthesisRequestChild()
{
MOZ_COUNT_DTOR(PSpeechSynthesisRequestChild);
}
auto PSpeechSynthesisRequestChild::ActorAlloc() -> void
{
}
auto PSpeechSynthesisRequestChild::ActorDealloc() -> void
{
if (Manager()) {
Manager()->DeallocManagee(PSpeechSynthesisRequestMsgStart, this);
}
}
auto PSpeechSynthesisRequestChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PSpeechSynthesisRequestChild::Manager() const -> PSpeechSynthesisChild*
{
return static_cast<PSpeechSynthesisChild*>(IProtocol::Manager());
}
auto PSpeechSynthesisRequestChild::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PSpeechSynthesisRequestChild::Send__delete__(PSpeechSynthesisRequestChild* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PSpeechSynthesisRequest::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PSpeechSynthesisRequestChild::SendPause() -> bool
{
UniquePtr<IPC::Message> msg__ = PSpeechSynthesisRequest::Msg_Pause(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_Pause", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSpeechSynthesisRequestChild::SendResume() -> bool
{
UniquePtr<IPC::Message> msg__ = PSpeechSynthesisRequest::Msg_Resume(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_Resume", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSpeechSynthesisRequestChild::SendCancel() -> bool
{
UniquePtr<IPC::Message> msg__ = PSpeechSynthesisRequest::Msg_Cancel(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_Cancel", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSpeechSynthesisRequestChild::SendForceEnd() -> bool
{
UniquePtr<IPC::Message> msg__ = PSpeechSynthesisRequest::Msg_ForceEnd(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_ForceEnd", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSpeechSynthesisRequestChild::SendSetAudioOutputVolume(const float& aVolume) -> bool
{
UniquePtr<IPC::Message> msg__ = PSpeechSynthesisRequest::Msg_SetAudioOutputVolume(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aVolume);
// Sentinel = 'aVolume'
((&(writer__)))->WriteSentinel(187368154);
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_SetAudioOutputVolume", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PSpeechSynthesisRequestChild::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PSpeechSynthesisRequestChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PSpeechSynthesisRequestChild::OnMessageReceived(const Message& msg__) -> PSpeechSynthesisRequestChild::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 PSpeechSynthesisRequest::Reply___delete____ID:
{
return MsgProcessed;
}
case PSpeechSynthesisRequest::Msg_OnEnd__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_OnEnd", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aIsError = IPC::ReadParam<bool>((&(reader__)));
if (!maybe__aIsError) {
FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aIsError = *maybe__aIsError;
// Sentinel = 'aIsError'
if ((!(((&(reader__)))->ReadSentinel(227017512)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
auto maybe__aElapsedTime = IPC::ReadParam<float>((&(reader__)));
if (!maybe__aElapsedTime) {
FatalError("Error deserializing 'float'");
return MsgValueError;
}
auto& aElapsedTime = *maybe__aElapsedTime;
// Sentinel = 'aElapsedTime'
if ((!(((&(reader__)))->ReadSentinel(502334639)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'float'");
return MsgValueError;
}
auto maybe__aCharIndex = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aCharIndex) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aCharIndex = *maybe__aCharIndex;
// Sentinel = 'aCharIndex'
if ((!(((&(reader__)))->ReadSentinel(341115864)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvOnEnd(std::move(aIsError), std::move(aElapsedTime), std::move(aCharIndex));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSpeechSynthesisRequest::Msg_OnStart__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_OnStart", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aUri = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__aUri) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& aUri = *maybe__aUri;
// Sentinel = 'aUri'
if ((!(((&(reader__)))->ReadSentinel(64225682)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvOnStart(std::move(aUri));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSpeechSynthesisRequest::Msg_OnPause__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_OnPause", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aElapsedTime = IPC::ReadParam<float>((&(reader__)));
if (!maybe__aElapsedTime) {
FatalError("Error deserializing 'float'");
return MsgValueError;
}
auto& aElapsedTime = *maybe__aElapsedTime;
// Sentinel = 'aElapsedTime'
if ((!(((&(reader__)))->ReadSentinel(502334639)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'float'");
return MsgValueError;
}
auto maybe__aCharIndex = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aCharIndex) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aCharIndex = *maybe__aCharIndex;
// Sentinel = 'aCharIndex'
if ((!(((&(reader__)))->ReadSentinel(341115864)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvOnPause(std::move(aElapsedTime), std::move(aCharIndex));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSpeechSynthesisRequest::Msg_OnResume__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_OnResume", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aElapsedTime = IPC::ReadParam<float>((&(reader__)));
if (!maybe__aElapsedTime) {
FatalError("Error deserializing 'float'");
return MsgValueError;
}
auto& aElapsedTime = *maybe__aElapsedTime;
// Sentinel = 'aElapsedTime'
if ((!(((&(reader__)))->ReadSentinel(502334639)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'float'");
return MsgValueError;
}
auto maybe__aCharIndex = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aCharIndex) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aCharIndex = *maybe__aCharIndex;
// Sentinel = 'aCharIndex'
if ((!(((&(reader__)))->ReadSentinel(341115864)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvOnResume(std::move(aElapsedTime), std::move(aCharIndex));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSpeechSynthesisRequest::Msg_OnBoundary__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_OnBoundary", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aName = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__aName) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& aName = *maybe__aName;
// Sentinel = 'aName'
if ((!(((&(reader__)))->ReadSentinel(92537315)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
auto maybe__aElapsedTime = IPC::ReadParam<float>((&(reader__)));
if (!maybe__aElapsedTime) {
FatalError("Error deserializing 'float'");
return MsgValueError;
}
auto& aElapsedTime = *maybe__aElapsedTime;
// Sentinel = 'aElapsedTime'
if ((!(((&(reader__)))->ReadSentinel(502334639)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'float'");
return MsgValueError;
}
auto maybe__aCharIndex = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aCharIndex) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aCharIndex = *maybe__aCharIndex;
// Sentinel = 'aCharIndex'
if ((!(((&(reader__)))->ReadSentinel(341115864)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__aCharLength = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aCharLength) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aCharLength = *maybe__aCharLength;
// Sentinel = 'aCharLength'
if ((!(((&(reader__)))->ReadSentinel(413140034)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__argc = IPC::ReadParam<uint8_t>((&(reader__)));
if (!maybe__argc) {
FatalError("Error deserializing 'uint8_t'");
return MsgValueError;
}
auto& argc = *maybe__argc;
// Sentinel = 'argc'
if ((!(((&(reader__)))->ReadSentinel(68092318)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint8_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvOnBoundary(std::move(aName), std::move(aElapsedTime), std::move(aCharIndex), std::move(aCharLength), std::move(argc));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PSpeechSynthesisRequest::Msg_OnMark__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PSpeechSynthesisRequest", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PSpeechSynthesisRequestChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PSpeechSynthesisRequest::Msg_OnMark", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aName = IPC::ReadParam<nsString>((&(reader__)));
if (!maybe__aName) {
FatalError("Error deserializing 'nsString'");
return MsgValueError;
}
auto& aName = *maybe__aName;
// Sentinel = 'aName'
if ((!(((&(reader__)))->ReadSentinel(92537315)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
return MsgValueError;
}
auto maybe__aElapsedTime = IPC::ReadParam<float>((&(reader__)));
if (!maybe__aElapsedTime) {
FatalError("Error deserializing 'float'");
return MsgValueError;
}
auto& aElapsedTime = *maybe__aElapsedTime;
// Sentinel = 'aElapsedTime'
if ((!(((&(reader__)))->ReadSentinel(502334639)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'float'");
return MsgValueError;
}
auto maybe__aCharIndex = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aCharIndex) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aCharIndex = *maybe__aCharIndex;
// Sentinel = 'aCharIndex'
if ((!(((&(reader__)))->ReadSentinel(341115864)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvOnMark(std::move(aName), std::move(aElapsedTime), std::move(aCharIndex));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PSpeechSynthesisRequestChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PSpeechSynthesisRequestChild::Result
{
return MsgNotKnown;
}
auto PSpeechSynthesisRequestChild::DoomSubtree() -> void
{
SetDoomed();
}
auto PSpeechSynthesisRequestChild::PeekManagedActor() -> IProtocol*
{
return nullptr;
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PSpeechSynthesisRequestChild*>::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::PSpeechSynthesisRequestChild*>::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, "PSpeechSynthesisRequest", PSpeechSynthesisRequestMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::PSpeechSynthesisRequestChild*>(actor.ref());
}
return {};
}
} // namespace IPC