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", PVerifySSLServerCertMsgStart, 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::AllManagedActors(nsTArray<RefPtr<mozilla::ipc::ActorLifecycleProxy>>& arr__) const -> void
{
uint32_t total = 0;
arr__.SetCapacity(total);
}
auto PVerifySSLServerCertParent::AllManagedActorsCount() const -> uint32_t
{
uint32_t total = 0;
return total;
}
auto PVerifySSLServerCertParent::SendOnVerifiedSSLServerCertSuccess(
mozilla::Span<ByteArray const> aBuiltCertChain,
const uint16_t& aCertTransparencyStatus,
const uint8_t& aEVStatus,
const bool& isBuiltCertChainRootBuiltInRoot,
const bool& aMadeOCSPRequests) -> bool
{
UniquePtr<IPC::Message> msg__ = PVerifySSLServerCert::Msg_OnVerifiedSSLServerCertSuccess(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__)), isBuiltCertChainRootBuiltInRoot);
// Sentinel = 'isBuiltCertChainRootBuiltInRoot'
((&(writer__)))->WriteSentinel(3281652813);
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_OnVerifiedSSLServerCertSuccess", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PVerifySSLServerCertParent::SendOnVerifiedSSLServerCertFailure(
const int32_t& aFinalError,
const uint32_t& aOverridableErrorCategory,
const bool& aMadeOCSPRequests) -> bool
{
UniquePtr<IPC::Message> msg__ = PVerifySSLServerCert::Msg_OnVerifiedSSLServerCertFailure(MSG_ROUTING_CONTROL);
IPC::MessageWriter writer__{
(*(msg__)),
this};
IPC::WriteParam((&(writer__)), aFinalError);
// Sentinel = 'aFinalError'
((&(writer__)))->WriteSentinel(420021334);
IPC::WriteParam((&(writer__)), aOverridableErrorCategory);
// Sentinel = 'aOverridableErrorCategory'
((&(writer__)))->WriteSentinel(2173635097);
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_OnVerifiedSSLServerCertFailure", OTHER);
bool sendok__ = ChannelSend(std::move(msg__));
return sendok__;
}
auto PVerifySSLServerCertParent::RemoveManagee(
int32_t aProtocolId,
IProtocol* aListener) -> void
{
FatalError("unreached");
return;
}
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;
}
auto PVerifySSLServerCertParent::OnChannelClose() -> void
{
DestroySubtree(NormalShutdown);
ClearSubtree();
DeallocShmems();
if (GetLifecycleProxy()) {
GetLifecycleProxy()->Release();
}
}
auto PVerifySSLServerCertParent::OnChannelError() -> void
{
DestroySubtree(AbnormalShutdown);
ClearSubtree();
DeallocShmems();
if (GetLifecycleProxy()) {
GetLifecycleProxy()->Release();
}
}
auto PVerifySSLServerCertParent::ClearSubtree() -> void
{
}
} // 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