Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PRemoteWorkerControllerChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/RemoteWorkerControllerChild.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/dom/WorkerIPCUtils.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/PBackgroundChild.h"
#include "mozilla/dom/PFetchEventOpChild.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 PRemoteWorkerControllerChild::PRemoteWorkerControllerChild() :
mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PRemoteWorkerControllerChild);
}
PRemoteWorkerControllerChild::~PRemoteWorkerControllerChild()
{
MOZ_COUNT_DTOR(PRemoteWorkerControllerChild);
}
auto PRemoteWorkerControllerChild::ActorAlloc() -> void
{
AddRef();
}
auto PRemoteWorkerControllerChild::ActorDealloc() -> void
{
Release();
}
auto PRemoteWorkerControllerChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PRemoteWorkerControllerChild::OtherChildID() const -> ::GeckoChildID
{
::GeckoChildID childID =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherChildIDMaybeInvalid();
MOZ_RELEASE_ASSERT(childID != -1);
return childID;
}
auto PRemoteWorkerControllerChild::OtherEndpointProcInfo() const -> ::mozilla::ipc::EndpointProcInfo
{
return ::mozilla::ipc::EndpointProcInfo{OtherPid(), OtherChildID()};
}
auto PRemoteWorkerControllerChild::Manager() const -> PBackgroundChild*
{
return static_cast<PBackgroundChild*>(IProtocol::Manager());
}
auto PRemoteWorkerControllerChild::ManagedPFetchEventOpChild(nsTArray<PFetchEventOpChild*>& aArr) const -> void
{
mManagedPFetchEventOpChild.ToArray(aArr);
}
auto PRemoteWorkerControllerChild::ManagedPFetchEventOpChild() const -> const ManagedContainer<PFetchEventOpChild>&
{
return mManagedPFetchEventOpChild;
}
auto PRemoteWorkerControllerChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
static constexpr ::mozilla::ipc::ProtocolId sIds[] = {
PFetchEventOpMsgStart
};
return sIds;
}
auto PRemoteWorkerControllerChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
case PFetchEventOpMsgStart:
return (&(mManagedPFetchEventOpChild));
default:
return nullptr;
}
}
auto PRemoteWorkerControllerChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
mAsyncCallbacks.RejectPendingResponses(aReason);
}
auto PRemoteWorkerControllerChild::OpenPFetchEventOpEndpoint(PFetchEventOpChild* aActor) -> ManagedEndpoint<PFetchEventOpParent>
{
if (!aActor) {
NS_WARNING("Cannot bind null PFetchEventOpChild actor");
return ManagedEndpoint<PFetchEventOpParent>();
}
if (!aActor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PFetchEventOpChild actor");
return ManagedEndpoint<PFetchEventOpParent>();
}
// Mark our actor as awaiting the other side to be bound. This will
// be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
// received.
aActor->mAwaitingManagedEndpointBind = true;
return ManagedEndpoint<PFetchEventOpParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}
auto PRemoteWorkerControllerChild::BindPFetchEventOpEndpoint(
ManagedEndpoint<PFetchEventOpChild> aEndpoint,
PFetchEventOpChild* aActor) -> bool
{
return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}
auto PRemoteWorkerControllerChild::SendPFetchEventOpConstructor(const ParentToParentServiceWorkerFetchEventOpArgs& aArgs) -> PFetchEventOpChild*
{
PFetchEventOpChild* actor = (static_cast<RemoteWorkerControllerChild*>(this))->AllocPFetchEventOpChild(aArgs);
return SendPFetchEventOpConstructor(std::move(actor), std::move(aArgs));
}
auto PRemoteWorkerControllerChild::SendPFetchEventOpConstructor(
PFetchEventOpChild* actor,
const ParentToParentServiceWorkerFetchEventOpArgs& aArgs) -> PFetchEventOpChild*
{
if (!actor) {
NS_WARNING("Cannot bind null PFetchEventOpChild actor");
return nullptr;
}
if (!actor->SetManagerAndRegister(this)) {
NS_WARNING("Failed to bind PFetchEventOpChild actor");
return nullptr;
}
// Build our constructor message.
UniquePtr<IPC::Message> msg__ = PRemoteWorkerController::Msg_PFetchEventOpConstructor(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), actor);
// Sentinel = 'actor'
((&(writer__)))->WriteSentinel(102892058);
IPC::WriteParam((&(writer__)), aArgs);
// Sentinel = 'aArgs'
((&(writer__)))->WriteSentinel(92602863);
// Notify the other side about the newly created actor. This can
// fail if our manager has already been destroyed.
//
// NOTE: If the send call fails due to toplevel channel teardown,
// the `IProtocol::ChannelSend` wrapper absorbs the error for us,
// so we don't tear down actors unexpectedly.
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_PFetchEventOpConstructor", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
// Warn, destroy the actor, and return null if the message failed to
// send. Otherwise, return the successfully created actor reference.
if (!sendok__) {
NS_WARNING("Error sending PFetchEventOpChild constructor");
actor->ActorDisconnected(FailedConstructor);
return nullptr;
}
return actor;
}
auto PRemoteWorkerControllerChild::Send__delete__(PRemoteWorkerControllerChild* actor) -> bool
{
if (!actor || !actor->CanSend()) {
NS_WARNING("Attempt to __delete__ missing or closed actor");
return false;
}
UniquePtr<IPC::Message> msg__ = PRemoteWorkerController::Msg___delete__((actor)->Id());
IPC::MessageWriter writer__{
(*(msg__)),
actor};
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
actor->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg___delete__", OTHER);
bool sendok__ = (actor)->ChannelSend(std::move(msg__));
actor->ActorDisconnected(Deletion);
return sendok__;
}
auto PRemoteWorkerControllerChild::SendShutdown(
mozilla::ipc::ResolveCallback<bool>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PRemoteWorkerController::Msg_Shutdown(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_Shutdown", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PRemoteWorkerController::Reply_Shutdown__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aOk = IPC::ReadParam<bool>(aReader);
if (!maybe__aOk) {
(aReader)->FatalError("Error deserializing 'bool'");
return MsgValueError;
}
auto& aOk = *maybe__aOk;
// Sentinel = 'aOk'
if ((!((aReader)->ReadSentinel(36634908)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(aOk));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PRemoteWorkerControllerChild::SendShutdown() -> RefPtr<ShutdownPromise>
{
RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendShutdown([promise__](bool&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PRemoteWorkerControllerChild::SendExecServiceWorkerOp(
const ServiceWorkerOpArgs& aArgs,
mozilla::ipc::ResolveCallback<ServiceWorkerOpResult>&& aResolve,
mozilla::ipc::RejectCallback&& aReject) -> void
{
UniquePtr<IPC::Message> msg__ = PRemoteWorkerController::Msg_ExecServiceWorkerOp(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aArgs);
// Sentinel = 'aArgs'
((&(writer__)))->WriteSentinel(92602863);
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_ExecServiceWorkerOp", OTHER);
int32_t seqno__ = 0;
if (ChannelSend(std::move(msg__), (&(seqno__)))) {
mAsyncCallbacks.AddCallback(seqno__, PRemoteWorkerController::Reply_ExecServiceWorkerOp__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
auto maybe__aResult = IPC::ReadParam<ServiceWorkerOpResult>(aReader);
if (!maybe__aResult) {
(aReader)->FatalError("Error deserializing 'ServiceWorkerOpResult'");
return MsgValueError;
}
auto& aResult = *maybe__aResult;
// Sentinel = 'aResult'
if ((!((aReader)->ReadSentinel(185205473)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ServiceWorkerOpResult'");
return MsgValueError;
}
aReader->EndRead();
resolve(std::move(aResult));
return MsgProcessed;
}, std::move(aReject));
}
else {
aReject(::mozilla::ipc::ResponseRejectReason::SendError);
}
return;
}
auto PRemoteWorkerControllerChild::SendExecServiceWorkerOp(const ServiceWorkerOpArgs& aArgs) -> RefPtr<ExecServiceWorkerOpPromise>
{
RefPtr<MozPromise<ServiceWorkerOpResult, ResponseRejectReason, true>::Private> promise__ = new MozPromise<ServiceWorkerOpResult, ResponseRejectReason, true>::Private(__func__);
promise__->UseDirectTaskDispatch(__func__);
SendExecServiceWorkerOp(std::move(aArgs), [promise__](ServiceWorkerOpResult&& aValue) {
promise__->Resolve(std::move(aValue), __func__);
}, [promise__](ResponseRejectReason&& aReason) {
promise__->Reject(std::move(aReason), __func__);
});
return promise__;
}
auto PRemoteWorkerControllerChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
switch (aProtocolId) {
case PFetchEventOpMsgStart:
static_cast<RemoteWorkerControllerChild*>(this)->DeallocPFetchEventOpChild(static_cast<PFetchEventOpChild*>(aListener));
return;
default:
FatalError("unreached");
return;
}
}
auto PRemoteWorkerControllerChild::OnMessageReceived(const Message& msg__) -> PRemoteWorkerControllerChild::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 PRemoteWorkerController::Msg_CreationFailed__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_CreationFailed", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<RemoteWorkerControllerChild*>(this))->RecvCreationFailed();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PRemoteWorkerController::Msg_CreationSucceeded__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_CreationSucceeded", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<RemoteWorkerControllerChild*>(this))->RecvCreationSucceeded();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PRemoteWorkerController::Msg_ErrorReceived__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_ErrorReceived", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aError = IPC::ReadParam<ErrorValue>((&(reader__)));
if (!maybe__aError) {
FatalError("Error deserializing 'ErrorValue'");
return MsgValueError;
}
auto& aError = *maybe__aError;
// Sentinel = 'aError'
if ((!(((&(reader__)))->ReadSentinel(135463532)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ErrorValue'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<RemoteWorkerControllerChild*>(this))->RecvErrorReceived(std::move(aError));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PRemoteWorkerController::Msg_Terminated__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_Terminated", OTHER);
mozilla::ipc::IPCResult __ok = (static_cast<RemoteWorkerControllerChild*>(this))->RecvTerminated();
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PRemoteWorkerController::Msg_SetServiceWorkerSkipWaitingFlag__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_SetServiceWorkerSkipWaitingFlag", OTHER);
int32_t id__ = Id();
UniquePtr<IPC::Message> reply__(PRemoteWorkerController::Reply_SetServiceWorkerSkipWaitingFlag(id__));
reply__->set_seqno(msg__.seqno());
RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);
SetServiceWorkerSkipWaitingFlagResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
IPC::MessageWriter writer__(*reply__, self__);
IPC::WriteParam((&(writer__)), aParam);
// Sentinel = 'aOk'
((&(writer__)))->WriteSentinel(36634908);
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending reply ",
reply__->type(),
mozilla::ipc::MessageDirection::eSending);
}
});
};
mozilla::ipc::IPCResult __ok = (static_cast<RemoteWorkerControllerChild*>(this))->RecvSetServiceWorkerSkipWaitingFlag(std::move(resolver));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PRemoteWorkerController::Reply_PFetchEventOpConstructor__ID:
{
return MsgProcessed;
}
case PRemoteWorkerController::Reply___delete____ID:
{
return MsgProcessed;
}
case PRemoteWorkerController::Reply_Shutdown__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_Shutdown", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
case PRemoteWorkerController::Reply_ExecServiceWorkerOp__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PRemoteWorkerController", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PRemoteWorkerControllerChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PRemoteWorkerController::Msg_ExecServiceWorkerOp", OTHER);
return mAsyncCallbacks.GotReply(this, msg__);
}
default:
return MsgNotKnown;
}
}
auto PRemoteWorkerControllerChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PRemoteWorkerControllerChild::Result
{
return MsgNotKnown;
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PRemoteWorkerControllerChild*>::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::PRemoteWorkerControllerChild*>::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, "PRemoteWorkerController", PRemoteWorkerControllerMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::PRemoteWorkerControllerChild*>(actor.ref());
}
return {};
}
} // namespace IPC