Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/PFetchEventOpChild.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/RemoteLazyInputStream.h"
#include "mozilla/dom/FetchEventOpChild.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/ipc/TransportSecurityInfoUtils.h"
#include "nsID.h"
#include "nsITransportSecurityInfo.h"
#include "mozilla/dom/PRemoteWorkerControllerChild.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 PFetchEventOpChild::PFetchEventOpChild() :
mozilla::ipc::IProtocol(PFetchEventOpMsgStart, mozilla::ipc::ChildSide)
{
MOZ_COUNT_CTOR(PFetchEventOpChild);
}
PFetchEventOpChild::~PFetchEventOpChild()
{
MOZ_COUNT_DTOR(PFetchEventOpChild);
}
auto PFetchEventOpChild::ActorAlloc() -> void
{
}
auto PFetchEventOpChild::ActorDealloc() -> void
{
if (Manager()) {
Manager()->DeallocManagee(PFetchEventOpMsgStart, this);
}
}
auto PFetchEventOpChild::OtherPid() const -> ::base::ProcessId
{
::base::ProcessId pid =
::mozilla::ipc::IProtocol::ToplevelProtocol()->OtherPidMaybeInvalid();
MOZ_RELEASE_ASSERT(pid != ::base::kInvalidProcessId);
return pid;
}
auto PFetchEventOpChild::Manager() const -> PRemoteWorkerControllerChild*
{
return static_cast<PRemoteWorkerControllerChild*>(IProtocol::Manager());
}
auto PFetchEventOpChild::AllManagedActors(nsTArray<RefPtr<mozilla::ipc::ActorLifecycleProxy>>& arr__) const -> void
{
uint32_t total = 0;
arr__.SetCapacity(total);
}
auto PFetchEventOpChild::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PFetchEventOpChild::SendPreloadResponse(const ParentToParentInternalResponse& aResponse) -> bool
{
UniquePtr<IPC::Message> msg__ = PFetchEventOp::Msg_PreloadResponse(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aResponse);
// Sentinel = 'aResponse'
((&(writer__)))->WriteSentinel(301466545);
if (mozilla::ipc::LoggingEnabledFor("PFetchEventOp", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PFetchEventOpChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PFetchEventOp::Msg_PreloadResponse", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PFetchEventOpChild::SendPreloadResponseTiming(const ResponseTiming& aTiming) -> bool
{
UniquePtr<IPC::Message> msg__ = PFetchEventOp::Msg_PreloadResponseTiming(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aTiming);
// Sentinel = 'aTiming'
((&(writer__)))->WriteSentinel(182780618);
if (mozilla::ipc::LoggingEnabledFor("PFetchEventOp", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PFetchEventOpChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PFetchEventOp::Msg_PreloadResponseTiming", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PFetchEventOpChild::SendPreloadResponseEnd(const ResponseEndArgs& aArgs) -> bool
{
UniquePtr<IPC::Message> msg__ = PFetchEventOp::Msg_PreloadResponseEnd(Id());
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aArgs);
// Sentinel = 'aArgs'
((&(writer__)))->WriteSentinel(92602863);
if (mozilla::ipc::LoggingEnabledFor("PFetchEventOp", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PFetchEventOpChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PFetchEventOp::Msg_PreloadResponseEnd", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PFetchEventOpChild::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PFetchEventOpChild::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PFetchEventOpChild::OnMessageReceived(const Message& msg__) -> PFetchEventOpChild::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;
IProtocol* mgr = this->Manager();
this->DestroySubtree(ManagedEndpointDropped);
this->ClearSubtree();
mgr->RemoveManagee(PFetchEventOpMsgStart, this);
return MsgProcessed;
}
case PFetchEventOp::Msg_AsyncLog__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PFetchEventOp", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PFetchEventOpChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PFetchEventOp::Msg_AsyncLog", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aScriptSpec = IPC::ReadParam<nsCString>((&(reader__)));
if (!maybe__aScriptSpec) {
FatalError("Error deserializing 'nsCString'");
return MsgValueError;
}
auto& aScriptSpec = *maybe__aScriptSpec;
// Sentinel = 'aScriptSpec'
if ((!(((&(reader__)))->ReadSentinel(436929634)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
return MsgValueError;
}
auto maybe__aLineNumber = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aLineNumber) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aLineNumber = *maybe__aLineNumber;
// Sentinel = 'aLineNumber'
if ((!(((&(reader__)))->ReadSentinel(423953491)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__aColumnNumber = IPC::ReadParam<uint32_t>((&(reader__)));
if (!maybe__aColumnNumber) {
FatalError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto& aColumnNumber = *maybe__aColumnNumber;
// Sentinel = 'aColumnNumber'
if ((!(((&(reader__)))->ReadSentinel(601163065)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
return MsgValueError;
}
auto maybe__aMessageName = IPC::ReadParam<nsCString>((&(reader__)));
if (!maybe__aMessageName) {
FatalError("Error deserializing 'nsCString'");
return MsgValueError;
}
auto& aMessageName = *maybe__aMessageName;
// Sentinel = 'aMessageName'
if ((!(((&(reader__)))->ReadSentinel(505414824)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
return MsgValueError;
}
auto maybe__aParams = IPC::ReadParam<nsTArray<nsString>>((&(reader__)));
if (!maybe__aParams) {
FatalError("Error deserializing 'nsString[]'");
return MsgValueError;
}
auto& aParams = *maybe__aParams;
// Sentinel = 'aParams'
if ((!(((&(reader__)))->ReadSentinel(178979526)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'nsString[]'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<FetchEventOpChild*>(this))->RecvAsyncLog(std::move(aScriptSpec), std::move(aLineNumber), std::move(aColumnNumber), std::move(aMessageName), std::move(aParams));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PFetchEventOp::Msg_RespondWith__ID:
{
if (mozilla::ipc::LoggingEnabledFor("PFetchEventOp", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PFetchEventOpChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PFetchEventOp::Msg_RespondWith", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aResult = IPC::ReadParam<ParentToParentFetchEventRespondWithResult>((&(reader__)));
if (!maybe__aResult) {
FatalError("Error deserializing 'ParentToParentFetchEventRespondWithResult'");
return MsgValueError;
}
auto& aResult = *maybe__aResult;
// Sentinel = 'aResult'
if ((!(((&(reader__)))->ReadSentinel(185205473)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ParentToParentFetchEventRespondWithResult'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<FetchEventOpChild*>(this))->RecvRespondWith(std::move(aResult));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
return MsgProcessed;
}
case PFetchEventOp::Msg___delete____ID:
{
if (mozilla::ipc::LoggingEnabledFor("PFetchEventOp", mozilla::ipc::ChildSide)) {
mozilla::ipc::LogMessageForProtocol(
"PFetchEventOpChild",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Received ",
(&(msg__))->type(),
mozilla::ipc::MessageDirection::eReceiving);
}
AUTO_PROFILER_LABEL("PFetchEventOp::Msg___delete__", OTHER);
IPC::MessageReader reader__{
msg__,
this};
auto maybe__aResult = IPC::ReadParam<ServiceWorkerFetchEventOpResult>((&(reader__)));
if (!maybe__aResult) {
FatalError("Error deserializing 'ServiceWorkerFetchEventOpResult'");
return MsgValueError;
}
auto& aResult = *maybe__aResult;
// Sentinel = 'aResult'
if ((!(((&(reader__)))->ReadSentinel(185205473)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'ServiceWorkerFetchEventOpResult'");
return MsgValueError;
}
reader__.EndRead();
mozilla::ipc::IPCResult __ok = (static_cast<FetchEventOpChild*>(this))->Recv__delete__(std::move(aResult));
if ((!(__ok))) {
mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
// Error handled in mozilla::ipc::IPCResult
return MsgProcessingError;
}
IProtocol* mgr = this->Manager();
this->DestroySubtree(Deletion);
this->ClearSubtree();
mgr->RemoveManagee(PFetchEventOpMsgStart, this);
return MsgProcessed;
}
default:
return MsgNotKnown;
}
}
auto PFetchEventOpChild::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PFetchEventOpChild::Result
{
return MsgNotKnown;
}
auto PFetchEventOpChild::ClearSubtree() -> void
{
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PFetchEventOpChild*>::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::PFetchEventOpChild*>::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, "PFetchEventOp", PFetchEventOpMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::dom::PFetchEventOpChild*>(actor.ref());
}
return {};
}
} // namespace IPC