// // Automatically generated by ipdlc. // Edit at your own risk // #include "mozilla/hwinference/PSpeechRecognitionChild.h" #include "mozilla/ProfilerLabels.h" #include "mozilla/TimeStamp.h" #include "mozilla/hwinference/SpeechRecognitionChild.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 hwinference { auto PSpeechRecognitionChild::ProcessingError( Result aCode, const char* aReason) -> void { } auto PSpeechRecognitionChild::ShouldContinueFromReplyTimeout() -> bool { return true; } MOZ_IMPLICIT PSpeechRecognitionChild::PSpeechRecognitionChild() : mozilla::ipc::IToplevelProtocol("PSpeechRecognitionChild", kProtocolId, mozilla::ipc::ChildSide) { MOZ_COUNT_CTOR(PSpeechRecognitionChild); } PSpeechRecognitionChild::~PSpeechRecognitionChild() { MOZ_COUNT_DTOR(PSpeechRecognitionChild); } auto PSpeechRecognitionChild::ActorAlloc() -> void { MOZ_RELEASE_ASSERT(XRE_IsContentProcess(), "Invalid process for `PSpeechRecognitionChild'"); AddRef(); } auto PSpeechRecognitionChild::ActorDealloc() -> void { Release(); } auto PSpeechRecognitionChild::ManagedProtocolIds() const -> mozilla::Span { return {}; } auto PSpeechRecognitionChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer* { switch (aProtocol) { default: return nullptr; } } auto PSpeechRecognitionChild::RejectPendingResponses(ResponseRejectReason aReason) -> void { mAsyncCallbacks.RejectPendingResponses(aReason); } auto PSpeechRecognitionChild::SendIsModelAvailable( mozilla::Span languages, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PSpeechRecognition::Msg_IsModelAvailable(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), languages); // Sentinel = 'languages' ((&(writer__)))->WriteSentinel(310903736); if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_IsModelAvailable", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PSpeechRecognition::Reply_IsModelAvailable__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__available = IPC::ReadParam(aReader); if (!maybe__available) { (aReader)->FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& available = *maybe__available; // Sentinel = 'available' if ((!((aReader)->ReadSentinel(306316194)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(available)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PSpeechRecognitionChild::SendIsModelAvailable(mozilla::Span languages) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendIsModelAvailable(std::forward>(languages), [promise__](bool&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PSpeechRecognitionChild::SendIsModelInstalled( mozilla::Span languages, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PSpeechRecognition::Msg_IsModelInstalled(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), languages); // Sentinel = 'languages' ((&(writer__)))->WriteSentinel(310903736); if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_IsModelInstalled", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PSpeechRecognition::Reply_IsModelInstalled__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__installed = IPC::ReadParam(aReader); if (!maybe__installed) { (aReader)->FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& installed = *maybe__installed; // Sentinel = 'installed' if ((!((aReader)->ReadSentinel(319685569)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(installed)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PSpeechRecognitionChild::SendIsModelInstalled(mozilla::Span languages) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendIsModelInstalled(std::forward>(languages), [promise__](bool&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PSpeechRecognitionChild::SendInstallModels( mozilla::Span languages, const uint64_t& innerWindowId, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PSpeechRecognition::Msg_InstallModels(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), languages); // Sentinel = 'languages' ((&(writer__)))->WriteSentinel(310903736); IPC::WriteParam((&(writer__)), innerWindowId); // Sentinel = 'innerWindowId' ((&(writer__)))->WriteSentinel(627967298); if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_InstallModels", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PSpeechRecognition::Reply_InstallModels__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__result = IPC::ReadParam(aReader); if (!maybe__result) { (aReader)->FatalError("Error deserializing 'ModelInstallResult'"); return MsgValueError; } auto& result = *maybe__result; // Sentinel = 'result' if ((!((aReader)->ReadSentinel(153223840)))) { mozilla::ipc::SentinelReadError("Error deserializing 'ModelInstallResult'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(result)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PSpeechRecognitionChild::SendInstallModels( mozilla::Span languages, const uint64_t& innerWindowId) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendInstallModels(std::forward>(languages), std::forward(innerWindowId), [promise__](ModelInstallResult&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PSpeechRecognitionChild::SendInit( const nsACString& engineId, const nsACString& language, mozilla::Span phrases, mozilla::ipc::ResolveCallback&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PSpeechRecognition::Msg_Init(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), engineId); // Sentinel = 'engineId' ((&(writer__)))->WriteSentinel(243663652); IPC::WriteParam((&(writer__)), language); // Sentinel = 'language' ((&(writer__)))->WriteSentinel(248513349); IPC::WriteParam((&(writer__)), phrases); // Sentinel = 'phrases' ((&(writer__)))->WriteSentinel(198902519); if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_Init", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PSpeechRecognition::Reply_Init__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__error = IPC::ReadParam(aReader); if (!maybe__error) { (aReader)->FatalError("Error deserializing 'nsCString'"); return MsgValueError; } auto& error = *maybe__error; // Sentinel = 'error' if ((!((aReader)->ReadSentinel(107741739)))) { mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); return MsgValueError; } aReader->EndRead(); resolve(std::move(error)); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PSpeechRecognitionChild::SendInit( const nsACString& engineId, const nsACString& language, mozilla::Span phrases) -> RefPtr { RefPtr::Private> promise__ = new MozPromise::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendInit(std::forward(engineId), std::forward(language), std::forward>(phrases), [promise__](nsCString&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PSpeechRecognitionChild::SendProcessAudioData( mozilla::Span audioData, const TimeStamp& captureEndTime) -> bool { UniquePtr msg__ = PSpeechRecognition::Msg_ProcessAudioData(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; IPC::WriteParam((&(writer__)), audioData); // Sentinel = 'audioData' ((&(writer__)))->WriteSentinel(301138829); IPC::WriteParam((&(writer__)), captureEndTime); // Sentinel = 'captureEndTime' ((&(writer__)))->WriteSentinel(714212763); if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_ProcessAudioData", OTHER); bool sendok__ = ChannelSend(std::move(msg__)); return sendok__; } auto PSpeechRecognitionChild::SendStop( mozilla::ipc::ResolveCallback>&& aResolve, mozilla::ipc::RejectCallback&& aReject) -> void { UniquePtr msg__ = PSpeechRecognition::Msg_Stop(MSG_ROUTING_CONTROL); IPC::MessageWriter writer__{ (*(msg__)), this}; if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Sending ", msg__->type(), mozilla::ipc::MessageDirection::eSending); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_Stop", OTHER); IPC::Message::seqno_t seqno__ = 0; if (ChannelSend(std::move(msg__), (&(seqno__)))) { mAsyncCallbacks.AddCallback(seqno__, PSpeechRecognition::Reply_Stop__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable { auto maybe__anyFinalResult = IPC::ReadParam(aReader); if (!maybe__anyFinalResult) { (aReader)->FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& anyFinalResult = *maybe__anyFinalResult; // Sentinel = 'anyFinalResult' if ((!((aReader)->ReadSentinel(703595954)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } auto maybe__fedAudioMs = IPC::ReadParam(aReader); if (!maybe__fedAudioMs) { (aReader)->FatalError("Error deserializing 'double'"); return MsgValueError; } auto& fedAudioMs = *maybe__fedAudioMs; // Sentinel = 'fedAudioMs' if ((!((aReader)->ReadSentinel(355075042)))) { mozilla::ipc::SentinelReadError("Error deserializing 'double'"); return MsgValueError; } auto maybe__inferenceMs = IPC::ReadParam(aReader); if (!maybe__inferenceMs) { (aReader)->FatalError("Error deserializing 'double'"); return MsgValueError; } auto& inferenceMs = *maybe__inferenceMs; // Sentinel = 'inferenceMs' if ((!((aReader)->ReadSentinel(453117040)))) { mozilla::ipc::SentinelReadError("Error deserializing 'double'"); return MsgValueError; } aReader->EndRead(); resolve(std::make_tuple(std::move(anyFinalResult), std::move(fedAudioMs), std::move(inferenceMs))); return MsgProcessed; }, std::move(aReject)); } else { aReject(::mozilla::ipc::ResponseRejectReason::SendError); } return; } auto PSpeechRecognitionChild::SendStop() -> RefPtr { RefPtr, ResponseRejectReason, true>::Private> promise__ = new MozPromise, ResponseRejectReason, true>::Private(__func__); promise__->UseDirectTaskDispatch(__func__); SendStop([promise__](std::tuple&& aValue) { promise__->Resolve(std::move(aValue), __func__); }, [promise__](ResponseRejectReason&& aReason) { promise__->Reject(std::move(aReason), __func__); }); return promise__; } auto PSpeechRecognitionChild::DeallocManagee( mozilla::ipc::ProtocolId aProtocolId, IProtocol* aListener) -> void { FatalError("unreached"); return; } auto PSpeechRecognitionChild::OnMessageReceived(const Message& msg__) -> PSpeechRecognitionChild::Result { if (!CanSend()) { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Ignored message for dead actor", (&(msg__))->type(), mozilla::ipc::MessageDirection::eSending); } return MsgProcessed; } switch (msg__.type()) { case PSpeechRecognition::Reply_IsModelAvailable__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_IsModelAvailable", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PSpeechRecognition::Reply_IsModelInstalled__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_IsModelInstalled", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PSpeechRecognition::Reply_InstallModels__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_InstallModels", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PSpeechRecognition::Reply_Init__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_Init", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PSpeechRecognition::Reply_Stop__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_Stop", OTHER); return mAsyncCallbacks.GotReply(this, msg__); } case PSpeechRecognition::Msg_OnRecognitionResult__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_OnRecognitionResult", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__transcript = IPC::ReadParam((&(reader__))); if (!maybe__transcript) { FatalError("Error deserializing 'nsCString'"); return MsgValueError; } auto& transcript = *maybe__transcript; // Sentinel = 'transcript' if ((!(((&(reader__)))->ReadSentinel(395707467)))) { mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); return MsgValueError; } auto maybe__isFinal = IPC::ReadParam((&(reader__))); if (!maybe__isFinal) { FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& isFinal = *maybe__isFinal; // Sentinel = 'isFinal' if ((!(((&(reader__)))->ReadSentinel(185729735)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } auto maybe__confidence = IPC::ReadParam((&(reader__))); if (!maybe__confidence) { FatalError("Error deserializing 'float'"); return MsgValueError; } auto& confidence = *maybe__confidence; // Sentinel = 'confidence' if ((!(((&(reader__)))->ReadSentinel(377226255)))) { mozilla::ipc::SentinelReadError("Error deserializing 'float'"); return MsgValueError; } auto maybe__eventTime = IPC::ReadParam((&(reader__))); if (!maybe__eventTime) { FatalError("Error deserializing 'TimeStamp'"); return MsgValueError; } auto& eventTime = *maybe__eventTime; // Sentinel = 'eventTime' if ((!(((&(reader__)))->ReadSentinel(313197490)))) { mozilla::ipc::SentinelReadError("Error deserializing 'TimeStamp'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::hwinference::SpeechRecognitionChild*>(this))->RecvOnRecognitionResult(std::move(transcript), std::move(isFinal), std::move(confidence), std::move(eventTime)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PSpeechRecognition::Msg_OnRecognitionError__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_OnRecognitionError", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__error = IPC::ReadParam((&(reader__))); if (!maybe__error) { FatalError("Error deserializing 'nsCString'"); return MsgValueError; } auto& error = *maybe__error; // Sentinel = 'error' if ((!(((&(reader__)))->ReadSentinel(107741739)))) { mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::hwinference::SpeechRecognitionChild*>(this))->RecvOnRecognitionError(std::move(error)); if ((!(__ok))) { mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!"); // Error handled in mozilla::ipc::IPCResult return MsgProcessingError; } return MsgProcessed; } case PSpeechRecognition::Msg_OnSpeechChange__ID: { if (mozilla::ipc::LoggingEnabledFor("PSpeechRecognition", mozilla::ipc::ChildSide)) { mozilla::ipc::LogMessageForProtocol( "PSpeechRecognitionChild", this->ToplevelProtocol()->OtherPidMaybeInvalid(), "Received ", (&(msg__))->type(), mozilla::ipc::MessageDirection::eReceiving); } AUTO_PROFILER_LABEL("PSpeechRecognition::Msg_OnSpeechChange", OTHER); IPC::MessageReader reader__{ msg__, this}; auto maybe__speechDetected = IPC::ReadParam((&(reader__))); if (!maybe__speechDetected) { FatalError("Error deserializing 'bool'"); return MsgValueError; } auto& speechDetected = *maybe__speechDetected; // Sentinel = 'speechDetected' if ((!(((&(reader__)))->ReadSentinel(709559707)))) { mozilla::ipc::SentinelReadError("Error deserializing 'bool'"); return MsgValueError; } auto maybe__eventTime = IPC::ReadParam((&(reader__))); if (!maybe__eventTime) { FatalError("Error deserializing 'TimeStamp'"); return MsgValueError; } auto& eventTime = *maybe__eventTime; // Sentinel = 'eventTime' if ((!(((&(reader__)))->ReadSentinel(313197490)))) { mozilla::ipc::SentinelReadError("Error deserializing 'TimeStamp'"); return MsgValueError; } reader__.EndRead(); mozilla::ipc::IPCResult __ok = (static_cast<::mozilla::hwinference::SpeechRecognitionChild*>(this))->RecvOnSpeechChange(std::move(speechDetected), std::move(eventTime)); 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 PSpeechRecognitionChild::OnMessageReceived( const Message& msg__, UniquePtr& reply__) -> PSpeechRecognitionChild::Result { if (!CanSend()) { return MsgDropped; } MOZ_ASSERT_UNREACHABLE("message protocol not supported"); return MsgNotKnown; } } // namespace hwinference } // namespace mozilla