Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/psm/PVerifySSLServerCertParent.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/psm/VerifySSLServerCertParent.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 psm {
auto PVerifySSLServerCertParent::ProcessingError(
Result aCode,
const char* aReason) -> void
{
}
auto PVerifySSLServerCertParent::ShouldContinueFromReplyTimeout() -> bool
{
return true;
}
MOZ_IMPLICIT PVerifySSLServerCertParent::PVerifySSLServerCertParent() :
mozilla::ipc::IToplevelProtocol("PVerifySSLServerCertParent", kProtocolId, mozilla::ipc::ParentSide)
{
MOZ_COUNT_CTOR(PVerifySSLServerCertParent);
}
PVerifySSLServerCertParent::~PVerifySSLServerCertParent()
{
MOZ_COUNT_DTOR(PVerifySSLServerCertParent);
}
auto PVerifySSLServerCertParent::ActorAlloc() -> void
{
MOZ_RELEASE_ASSERT(XRE_IsParentProcess(), "Invalid process for `PVerifySSLServerCertParent'");
AddRef();
}
auto PVerifySSLServerCertParent::ActorDealloc() -> void
{
Release();
}
auto PVerifySSLServerCertParent::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
return {};
}
auto PVerifySSLServerCertParent::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
switch (aProtocol) {
default:
return nullptr;
}
}
auto PVerifySSLServerCertParent::SendOnVerifySSLServerCertFinished(
mozilla::Span<ByteArray const> aBuiltCertChain,
const uint16_t& aCertTransparencyStatus,
const EVStatus& aEVStatus,
const bool& aSucceeded,
const int32_t& aFinalError,
const OverridableErrorCategory& aOverridableErrorCategory,
const bool& aIsBuiltCertChainRootBuiltInRoot,
const bool& aMadeOCSPRequests) -> bool
{
UniquePtr<IPC::Message> msg__ = PVerifySSLServerCert::Msg_OnVerifySSLServerCertFinished(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aBuiltCertChain);
// Sentinel = 'aBuiltCertChain'
((&(writer__)))->WriteSentinel(772670931);
IPC::WriteParam((&(writer__)), aCertTransparencyStatus);
// Sentinel = 'aCertTransparencyStatus'
((&(writer__)))->WriteSentinel(1852770670);
IPC::WriteParam((&(writer__)), aEVStatus);
// Sentinel = 'aEVStatus'
((&(writer__)))->WriteSentinel(275186561);
IPC::WriteParam((&(writer__)), aSucceeded);
// Sentinel = 'aSucceeded'
((&(writer__)))->WriteSentinel(357893095);
IPC::WriteParam((&(writer__)), aFinalError);
// Sentinel = 'aFinalError'
((&(writer__)))->WriteSentinel(420021334);
IPC::WriteParam((&(writer__)), aOverridableErrorCategory);
// Sentinel = 'aOverridableErrorCategory'
((&(writer__)))->WriteSentinel(2173635097);
IPC::WriteParam((&(writer__)), aIsBuiltCertChainRootBuiltInRoot);
// Sentinel = 'aIsBuiltCertChainRootBuiltInRoot'
((&(writer__)))->WriteSentinel(3420130446);
IPC::WriteParam((&(writer__)), aMadeOCSPRequests);
// Sentinel = 'aMadeOCSPRequests'
((&(writer__)))->WriteSentinel(919012970);
if (mozilla::ipc::LoggingEnabledFor("PVerifySSLServerCert", mozilla::ipc::ParentSide)) {
mozilla::ipc::LogMessageForProtocol(
"PVerifySSLServerCertParent",
this->ToplevelProtocol()->OtherPidMaybeInvalid(),
"Sending ",
msg__->type(),
mozilla::ipc::MessageDirection::eSending);
}
AUTO_PROFILER_LABEL("PVerifySSLServerCert::Msg_OnVerifySSLServerCertFinished", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PVerifySSLServerCertParent::DeallocManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
auto PVerifySSLServerCertParent::OnMessageReceived(const Message& msg__) -> PVerifySSLServerCertParent::Result
{
switch (msg__.type()) {
case PVerifySSLServerCert::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 PVerifySSLServerCertParent::OnMessageReceived(
const Message& msg__,
UniquePtr<Message>& reply__) -> PVerifySSLServerCertParent::Result
{
MOZ_ASSERT_UNREACHABLE("message protocol not supported");
return MsgNotKnown;
}
} // namespace psm
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::psm::PVerifySSLServerCertParent*>::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::psm::PVerifySSLServerCertParent*>::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, "PVerifySSLServerCert", PVerifySSLServerCertMsgStart);
if (actor.isSome()) {
return static_cast<::mozilla::psm::PVerifySSLServerCertParent*>(actor.ref());
}
return {};
}
} // namespace IPC