Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/net/PBackgroundDataBridgeParent.h"
#include "mozilla/AntiTrackingIPCUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/SessionHistoryEntry.h"
#include "mozilla/ipc/TransportSecurityInfoUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/net/BackgroundDataBridgeParent.h"
#include "mozilla/net/CacheInfoIPCTypes.h"
#include "mozilla/net/ClassOfService.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "nsDOMNavigationTiming.h"
#include "nsDocShellLoadState.h"
#include "nsHttp.h"
#include "nsHttpHeaderArray.h"
#include "nsHttpResponseHead.h"
#include "nsIPropertyBag2.h"
#include "nsIReferrerInfo.h"
#include "nsITransportSecurityInfo.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 net {
auto PBackgroundDataBridgeParent::Recv__delete__() -> mozilla::ipc::IPCResult
{
return IPC_OK();
}
auto PBackgroundDataBridgeParent::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PBackgroundDataBridgeParent::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PBackgroundDataBridgeParent::PBackgroundDataBridgeParent() :
mozilla::ipc::IToplevelProtocol("PBackgroundDataBridgeParent", PBackgroundDataBridgeMsgStart, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PBackgroundDataBridgeParent);
}
PBackgroundDataBridgeParent::~PBackgroundDataBridgeParent()
{
MOZ_COUNT_DTOR(PBackgroundDataBridgeParent);
}
auto PBackgroundDataBridgeParent::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsSocketProcess(), "Invalid process for `PBackgroundDataBridgeParent'");
AddRef();
}
auto PBackgroundDataBridgeParent::ActorDealloc() -> void
{
Release();
}
auto PBackgroundDataBridgeParent::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PBackgroundDataBridgeParent::SendOnTransportAndData(
const uint64_t& offset,
const uint32_t& count,
const nsACString& data,
const TimeStamp& onDataAvailableStart) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundDataBridge::Msg_OnTransportAndData(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), offset);
// Sentinel = 'offset'
((&(writer__)))->WriteSentinel(147653256);
IPC::WriteParam((&(writer__)), count);
// Sentinel = 'count'
((&(writer__)))->WriteSentinel(106889770);
IPC::WriteParam((&(writer__)), data);
// Sentinel = 'data'
((&(writer__)))->WriteSentinel(67109275);
IPC::WriteParam((&(writer__)), onDataAvailableStart);
// Sentinel = 'onDataAvailableStart'
((&(writer__)))->WriteSentinel(1369049063);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundDataBridge", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundDataBridgeParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundDataBridge::Msg_OnTransportAndData", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundDataBridgeParent::SendOnStopRequest(
const nsresult& aStatus,
const ResourceTimingStructArgs& timing,
const TimeStamp& lastActiveTabOptimization,
const nsHttpHeaderArray& responseTrailers,
const TimeStamp& onStopRequestStart) -> bool
{
UniquePtr<IPC::Message> msg__ = PBackgroundDataBridge::Msg_OnStopRequest(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aStatus);
// Sentinel = 'aStatus'
((&(writer__)))->WriteSentinel(186712806);
IPC::WriteParam((&(writer__)), timing);
// Sentinel = 'timing'
((&(writer__)))->WriteSentinel(150798985);
IPC::WriteParam((&(writer__)), lastActiveTabOptimization);
// Sentinel = 'lastActiveTabOptimization'
((&(writer__)))->WriteSentinel(2190412335);
IPC::WriteParam((&(writer__)), responseTrailers);
// Sentinel = 'responseTrailers'
((&(writer__)))->WriteSentinel(961873590);
IPC::WriteParam((&(writer__)), onStopRequestStart);
// Sentinel = 'onStopRequestStart'
((&(writer__)))->WriteSentinel(1183909755);
if (mozilla::ipc::LoggingEnabledFor("PBackgroundDataBridge", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PBackgroundDataBridgeParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PBackgroundDataBridge::Msg_OnStopRequest", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PBackgroundDataBridgeParent::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PBackgroundDataBridgeParent::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PBackgroundDataBridgeParent::OnMessageReceived(const Message& msg__) -> PBackgroundDataBridgeParent::Result
{
switch (msg__.type()) {
case PBackgroundDataBridge::Reply___delete____ID:
{
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 PBackgroundDataBridgeParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PBackgroundDataBridgeParent::Result
{
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
auto PBackgroundDataBridgeParent::DoomSubtree() -> void
{
SetDoomed();
}
auto PBackgroundDataBridgeParent::PeekManagedActor() -> IProtocol*
{
return nullptr;
}
} // namespace net
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::net::PBackgroundDataBridgeParent*>::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::net::PBackgroundDataBridgeParent*>::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, "PBackgroundDataBridge", PBackgroundDataBridgeMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::net::PBackgroundDataBridgeParent*>(actor.ref());
}
return {};
}
} // namespace IPC