Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PServiceWorkerRegistrationChild.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/BindingIPCUtils.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/ipc/PBackgroundChild.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 PServiceWorkerRegistrationChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
MOZ_IMPLICIT PServiceWorkerRegistrationChild::PServiceWorkerRegistrationChild() :
mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PServiceWorkerRegistrationChild);
}
PServiceWorkerRegistrationChild::~PServiceWorkerRegistrationChild()
{
MOZ_COUNT_DTOR(PServiceWorkerRegistrationChild);
}
auto PServiceWorkerRegistrationChild::ActorAlloc() -> void
{
AddRef();
}
auto PServiceWorkerRegistrationChild::ActorDealloc() -> void
{
Release();
}
auto PServiceWorkerRegistrationChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PServiceWorkerRegistrationChild::OtherChildID() const -> ::GeckoChildID
{
::GeckoChildID childID =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
MOZ_RELEASE_ASSERT(childID != -1);
return childID;
}
auto PServiceWorkerRegistrationChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}
auto PServiceWorkerRegistrationChild::Manager() const -> PBackgroundChild*
{
return static_cast<PBackgroundChild*>(IProtocol::Manager());
}
auto PServiceWorkerRegistrationChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PServiceWorkerRegistrationChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PServiceWorkerRegistrationChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PServiceWorkerRegistrationChild::SendTeardown() -> bool
{
UniquePtr<IPC::Message> msg__ = PServiceWorkerRegistration::Msg_Teardown(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_Teardown", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PServiceWorkerRegistrationChild::SendUnregister(
mozilla::ipc::ResolveCallback<std::tuple<bool, CopyableErrorResult>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PServiceWorkerRegistration::Msg_Unregister(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_Unregister", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PServiceWorkerRegistration::Reply_Unregister__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aSuccess = IPC::ReadParam<bool>(aReader);
if (!maybe__aSuccess) {
(aReader)->FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aSuccess = *maybe__aSuccess;
// Sentinel = 'aSuccess'
if ((!((aReader)->ReadSentinel(236323643)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
auto maybe__aRv = IPC::ReadParam<CopyableErrorResult>(aReader);
if (!maybe__aRv) {
(aReader)->FatalError("Error deserializing 'CopyableErrorResult'");
return MsgValueError;
}
auto& aRv = *maybe__aRv;
// Sentinel = 'aRv'
if ((!((aReader)->ReadSentinel(37749034)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'CopyableErrorResult'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::make_tuple(std::move(aSuccess), std::move(aRv)));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PServiceWorkerRegistrationChild::SendUnregister() -> RefPtr<UnregisterPromise>
{
RefPtr<MozPromise<std::tuple<bool, CopyableErrorResult>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<std::tuple<bool, CopyableErrorResult>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendUnregister([promise__](std::tuple<bool, CopyableErrorResult>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PServiceWorkerRegistrationChild::SendUpdate(
const nsACString& aNewestWorkerScriptUrl,
mozilla::ipc::ResolveCallback<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PServiceWorkerRegistration::Msg_Update(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aNewestWorkerScriptUrl);
// Sentinel = 'aNewestWorkerScriptUrl'
((&(writer__)))->WriteSentinel(1714555130);
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_Update", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PServiceWorkerRegistration::Reply_Update__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aResult = IPC::ReadParam<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult>(aReader);
if (!maybe__aResult) {
(aReader)->FatalError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
return MsgValueError;
}
auto& aResult = *maybe__aResult;
// Sentinel = 'aResult'
if ((!((aReader)->ReadSentinel(185205473)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(aResult));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PServiceWorkerRegistrationChild::SendUpdate(const nsACString& aNewestWorkerScriptUrl) -> RefPtr<UpdatePromise>
{
RefPtr<MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, true>::Private> promise__ = new MozPromise<IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendUpdate(std::move(aNewestWorkerScriptUrl), [promise__](IPCServiceWorkerRegistrationDescriptorOrCopyableErrorResult&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PServiceWorkerRegistrationChild::SendSetNavigationPreloadEnabled(
const bool& aEnabled,
mozilla::ipc::ResolveCallback<bool>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PServiceWorkerRegistration::Msg_SetNavigationPreloadEnabled(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aEnabled);
// Sentinel = 'aEnabled'
((&(writer__)))->WriteSentinel(224789261);
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_SetNavigationPreloadEnabled", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PServiceWorkerRegistration::Reply_SetNavigationPreloadEnabled__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aSuccess = IPC::ReadParam<bool>(aReader);
if (!maybe__aSuccess) {
(aReader)->FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aSuccess = *maybe__aSuccess;
// Sentinel = 'aSuccess'
if ((!((aReader)->ReadSentinel(236323643)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(aSuccess));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PServiceWorkerRegistrationChild::SendSetNavigationPreloadEnabled(const bool& aEnabled) -> RefPtr<SetNavigationPreloadEnabledPromise>
{
RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendSetNavigationPreloadEnabled(std::move(aEnabled), [promise__](bool&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PServiceWorkerRegistrationChild::SendSetNavigationPreloadHeader(
const nsACString& aHeader,
mozilla::ipc::ResolveCallback<bool>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PServiceWorkerRegistration::Msg_SetNavigationPreloadHeader(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aHeader);
// Sentinel = 'aHeader'
((&(writer__)))->WriteSentinel(172163755);
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_SetNavigationPreloadHeader", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PServiceWorkerRegistration::Reply_SetNavigationPreloadHeader__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aSuccess = IPC::ReadParam<bool>(aReader);
if (!maybe__aSuccess) {
(aReader)->FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aSuccess = *maybe__aSuccess;
// Sentinel = 'aSuccess'
if ((!((aReader)->ReadSentinel(236323643)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(aSuccess));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PServiceWorkerRegistrationChild::SendSetNavigationPreloadHeader(const nsACString& aHeader) -> RefPtr<SetNavigationPreloadHeaderPromise>
{
RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendSetNavigationPreloadHeader(std::move(aHeader), [promise__](bool&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PServiceWorkerRegistrationChild::SendGetNavigationPreloadState(
mozilla::ipc::ResolveCallback<mozilla::Maybe<IPCNavigationPreloadState>>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PServiceWorkerRegistration::Msg_GetNavigationPreloadState(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_GetNavigationPreloadState", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PServiceWorkerRegistration::Reply_GetNavigationPreloadState__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aState = IPC::ReadParam<mozilla::Maybe<IPCNavigationPreloadState>>(aReader);
if (!maybe__aState) {
(aReader)->FatalError("Error deserializing 'IPCNavigationPreloadState?'");
return MsgValueError;
}
auto& aState = *maybe__aState;
// Sentinel = 'aState'
if ((!((aReader)->ReadSentinel(137036387)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IPCNavigationPreloadState?'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(aState));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PServiceWorkerRegistrationChild::SendGetNavigationPreloadState() -> RefPtr<GetNavigationPreloadStatePromise>
{
RefPtr<MozPromise<mozilla::Maybe<IPCNavigationPreloadState>, ResponseRejectReason, true>::Private> promise__ = new MozPromise<mozilla::Maybe<IPCNavigationPreloadState>, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendGetNavigationPreloadState([promise__](mozilla::Maybe<IPCNavigationPreloadState>&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PServiceWorkerRegistrationChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PServiceWorkerRegistrationChild::OnMessageReceived(const Message& msg__) -> PServiceWorkerRegistrationChild::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 PServiceWorkerRegistration::Reply_Unregister__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_Unregister", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PServiceWorkerRegistration::Reply_Update__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_Update", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PServiceWorkerRegistration::Reply_SetNavigationPreloadEnabled__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_SetNavigationPreloadEnabled", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PServiceWorkerRegistration::Reply_SetNavigationPreloadHeader__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_SetNavigationPreloadHeader", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PServiceWorkerRegistration::Reply_GetNavigationPreloadState__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_GetNavigationPreloadState", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PServiceWorkerRegistration::Msg___delete____ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg___delete__", OTHER);
mozilla::ipc::IPCResult __ok = (this)->Recv__delete__();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
this->ActorDisconnected(Deletion);
return MsgProcessed;
}
case PServiceWorkerRegistration::Msg_UpdateState__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_UpdateState", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aDescriptor = IPC::ReadParam<IPCServiceWorkerRegistrationDescriptor>((&(reader__)));
if (!maybe__aDescriptor) {
FatalError("Error deserializing 'IPCServiceWorkerRegistrationDescriptor'");
return MsgValueError;
}
auto& aDescriptor = *maybe__aDescriptor;
// Sentinel = 'aDescriptor'
if ((!(((&(reader__)))->ReadSentinel(433915009)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'IPCServiceWorkerRegistrationDescriptor'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (this)->RecvUpdateState(std::move(aDescriptor));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PServiceWorkerRegistration::Msg_FireUpdateFound__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PServiceWorkerRegistration", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PServiceWorkerRegistrationChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PServiceWorkerRegistration::Msg_FireUpdateFound", OTHER);
mozilla::ipc::IPCResult __ok = (this)->RecvFireUpdateFound();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PServiceWorkerRegistrationChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PServiceWorkerRegistrationChild::Result
{
return MsgNotKnown;
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PServiceWorkerRegistrationChild*>::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::PServiceWorkerRegistrationChild*>::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, "PServiceWorkerRegistration", PServiceWorkerRegistrationMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::PServiceWorkerRegistrationChild*>(actor.ref());
}
return {};
}
} // namespace IPC