Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/ipc/PBackgroundSharedTypes.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"
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ContentSecurityPolicy|
//
namespace mozilla {
namespace ipc {
auto ContentSecurityPolicy::operator==(const ContentSecurityPolicy& _o) const -> bool
{
if ((!((policy()) == ((_o).policy())))) {
return false;
}
if ((!((reportOnlyFlag()) == ((_o).reportOnlyFlag())))) {
return false;
}
if ((!((deliveredViaMetaTagFlag()) == ((_o).deliveredViaMetaTagFlag())))) {
return false;
}
return true;
}
auto ContentSecurityPolicy::operator!=(const ContentSecurityPolicy& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::ContentSecurityPolicy>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).policy());
// Sentinel = 'policy'
(aWriter)->WriteSentinel(150667921);
IPC::WriteParam(aWriter, (aVar).reportOnlyFlag());
// Sentinel = 'reportOnlyFlag'
(aWriter)->WriteSentinel(735839673);
IPC::WriteParam(aWriter, (aVar).deliveredViaMetaTagFlag());
// Sentinel = 'deliveredViaMetaTagFlag'
(aWriter)->WriteSentinel(1836517618);
}
auto ParamTraits<::mozilla::ipc::ContentSecurityPolicy>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___policy = IPC::ReadParam<::nsString>(aReader);
if (!maybe___policy) {
aReader->FatalError("Error deserializing 'policy' (nsString) member of 'ContentSecurityPolicy'");
return {};
}
auto& _policy = *maybe___policy;
// Sentinel = 'policy'
if ((!((aReader)->ReadSentinel(150667921)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'policy' (nsString) member of 'ContentSecurityPolicy'");
return {};
}
auto maybe___reportOnlyFlag = IPC::ReadParam<bool>(aReader);
if (!maybe___reportOnlyFlag) {
aReader->FatalError("Error deserializing 'reportOnlyFlag' (bool) member of 'ContentSecurityPolicy'");
return {};
}
auto& _reportOnlyFlag = *maybe___reportOnlyFlag;
// Sentinel = 'reportOnlyFlag'
if ((!((aReader)->ReadSentinel(735839673)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'reportOnlyFlag' (bool) member of 'ContentSecurityPolicy'");
return {};
}
auto maybe___deliveredViaMetaTagFlag = IPC::ReadParam<bool>(aReader);
if (!maybe___deliveredViaMetaTagFlag) {
aReader->FatalError("Error deserializing 'deliveredViaMetaTagFlag' (bool) member of 'ContentSecurityPolicy'");
return {};
}
auto& _deliveredViaMetaTagFlag = *maybe___deliveredViaMetaTagFlag;
// Sentinel = 'deliveredViaMetaTagFlag'
if ((!((aReader)->ReadSentinel(1836517618)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'deliveredViaMetaTagFlag' (bool) member of 'ContentSecurityPolicy'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_policy),
std::move(_reportOnlyFlag),
std::move(_deliveredViaMetaTagFlag)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ContentPrincipalInfo|
//
namespace mozilla {
namespace ipc {
auto ContentPrincipalInfo::operator==(const ContentPrincipalInfo& _o) const -> bool
{
if ((!((attrs()) == ((_o).attrs())))) {
return false;
}
if ((!((originNoSuffix()) == ((_o).originNoSuffix())))) {
return false;
}
if ((!((spec()) == ((_o).spec())))) {
return false;
}
if ((!((domain()) == ((_o).domain())))) {
return false;
}
if ((!((baseDomain()) == ((_o).baseDomain())))) {
return false;
}
return true;
}
auto ContentPrincipalInfo::operator!=(const ContentPrincipalInfo& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::ContentPrincipalInfo>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).attrs());
// Sentinel = 'attrs'
(aWriter)->WriteSentinel(107807279);
IPC::WriteParam(aWriter, (aVar).originNoSuffix());
// Sentinel = 'originNoSuffix'
(aWriter)->WriteSentinel(721618363);
IPC::WriteParam(aWriter, (aVar).spec());
// Sentinel = 'spec'
(aWriter)->WriteSentinel(72155564);
IPC::WriteParam(aWriter, (aVar).domain());
// Sentinel = 'domain'
(aWriter)->WriteSentinel(144704121);
IPC::WriteParam(aWriter, (aVar).baseDomain());
// Sentinel = 'baseDomain'
(aWriter)->WriteSentinel(360449012);
}
auto ParamTraits<::mozilla::ipc::ContentPrincipalInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___attrs = IPC::ReadParam<::mozilla::OriginAttributes>(aReader);
if (!maybe___attrs) {
aReader->FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'ContentPrincipalInfo'");
return {};
}
auto& _attrs = *maybe___attrs;
// Sentinel = 'attrs'
if ((!((aReader)->ReadSentinel(107807279)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'ContentPrincipalInfo'");
return {};
}
auto maybe___originNoSuffix = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___originNoSuffix) {
aReader->FatalError("Error deserializing 'originNoSuffix' (nsCString) member of 'ContentPrincipalInfo'");
return {};
}
auto& _originNoSuffix = *maybe___originNoSuffix;
// Sentinel = 'originNoSuffix'
if ((!((aReader)->ReadSentinel(721618363)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'originNoSuffix' (nsCString) member of 'ContentPrincipalInfo'");
return {};
}
auto maybe___spec = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___spec) {
aReader->FatalError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
return {};
}
auto& _spec = *maybe___spec;
// Sentinel = 'spec'
if ((!((aReader)->ReadSentinel(72155564)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'ContentPrincipalInfo'");
return {};
}
auto maybe___domain = IPC::ReadParam<mozilla::Maybe<::nsCString>>(aReader);
if (!maybe___domain) {
aReader->FatalError("Error deserializing 'domain' (nsCString?) member of 'ContentPrincipalInfo'");
return {};
}
auto& _domain = *maybe___domain;
// Sentinel = 'domain'
if ((!((aReader)->ReadSentinel(144704121)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'domain' (nsCString?) member of 'ContentPrincipalInfo'");
return {};
}
auto maybe___baseDomain = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___baseDomain) {
aReader->FatalError("Error deserializing 'baseDomain' (nsCString) member of 'ContentPrincipalInfo'");
return {};
}
auto& _baseDomain = *maybe___baseDomain;
// Sentinel = 'baseDomain'
if ((!((aReader)->ReadSentinel(360449012)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'baseDomain' (nsCString) member of 'ContentPrincipalInfo'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_attrs),
std::move(_originNoSuffix),
std::move(_spec),
std::move(_domain),
std::move(_baseDomain)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct SystemPrincipalInfo|
//
namespace mozilla {
namespace ipc {
auto SystemPrincipalInfo::operator==(const SystemPrincipalInfo& _o) const -> bool
{
return true;
}
auto SystemPrincipalInfo::operator!=(const SystemPrincipalInfo& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::SystemPrincipalInfo>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
}
auto ParamTraits<::mozilla::ipc::SystemPrincipalInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{std::in_place};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct NullPrincipalInfo|
//
namespace mozilla {
namespace ipc {
auto NullPrincipalInfo::operator==(const NullPrincipalInfo& _o) const -> bool
{
if ((!((attrs()) == ((_o).attrs())))) {
return false;
}
if ((!((spec()) == ((_o).spec())))) {
return false;
}
return true;
}
auto NullPrincipalInfo::operator!=(const NullPrincipalInfo& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::NullPrincipalInfo>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).attrs());
// Sentinel = 'attrs'
(aWriter)->WriteSentinel(107807279);
IPC::WriteParam(aWriter, (aVar).spec());
// Sentinel = 'spec'
(aWriter)->WriteSentinel(72155564);
}
auto ParamTraits<::mozilla::ipc::NullPrincipalInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___attrs = IPC::ReadParam<::mozilla::OriginAttributes>(aReader);
if (!maybe___attrs) {
aReader->FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'NullPrincipalInfo'");
return {};
}
auto& _attrs = *maybe___attrs;
// Sentinel = 'attrs'
if ((!((aReader)->ReadSentinel(107807279)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'NullPrincipalInfo'");
return {};
}
auto maybe___spec = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___spec) {
aReader->FatalError("Error deserializing 'spec' (nsCString) member of 'NullPrincipalInfo'");
return {};
}
auto& _spec = *maybe___spec;
// Sentinel = 'spec'
if ((!((aReader)->ReadSentinel(72155564)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'spec' (nsCString) member of 'NullPrincipalInfo'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_attrs),
std::move(_spec)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ExpandedPrincipalInfo|
//
namespace mozilla {
namespace ipc {
auto ExpandedPrincipalInfo::operator==(const ExpandedPrincipalInfo& _o) const -> bool
{
if ((!((attrs()) == ((_o).attrs())))) {
return false;
}
if ((!((allowlist()) == ((_o).allowlist())))) {
return false;
}
return true;
}
auto ExpandedPrincipalInfo::operator!=(const ExpandedPrincipalInfo& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::ExpandedPrincipalInfo>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).attrs());
// Sentinel = 'attrs'
(aWriter)->WriteSentinel(107807279);
IPC::WriteParam(aWriter, (aVar).allowlist());
// Sentinel = 'allowlist'
(aWriter)->WriteSentinel(318243804);
}
auto ParamTraits<::mozilla::ipc::ExpandedPrincipalInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___attrs = IPC::ReadParam<::mozilla::OriginAttributes>(aReader);
if (!maybe___attrs) {
aReader->FatalError("Error deserializing 'attrs' (OriginAttributes) member of 'ExpandedPrincipalInfo'");
return {};
}
auto& _attrs = *maybe___attrs;
// Sentinel = 'attrs'
if ((!((aReader)->ReadSentinel(107807279)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'attrs' (OriginAttributes) member of 'ExpandedPrincipalInfo'");
return {};
}
auto maybe___allowlist = IPC::ReadParam<nsTArray<::mozilla::ipc::PrincipalInfo>>(aReader);
if (!maybe___allowlist) {
aReader->FatalError("Error deserializing 'allowlist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
return {};
}
auto& _allowlist = *maybe___allowlist;
// Sentinel = 'allowlist'
if ((!((aReader)->ReadSentinel(318243804)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'allowlist' (PrincipalInfo[]) member of 'ExpandedPrincipalInfo'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_attrs),
std::move(_allowlist)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union PrincipalInfo|
//
namespace mozilla {
namespace ipc {
auto PrincipalInfo::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TContentPrincipalInfo:
{
(ptr_ContentPrincipalInfo())->~ContentPrincipalInfo__tdef();
break;
}
case TSystemPrincipalInfo:
{
(ptr_SystemPrincipalInfo())->~SystemPrincipalInfo__tdef();
break;
}
case TNullPrincipalInfo:
{
(ptr_NullPrincipalInfo())->~NullPrincipalInfo__tdef();
break;
}
case TExpandedPrincipalInfo:
{
delete ptr_ExpandedPrincipalInfo();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(const ContentPrincipalInfo& aOther)
{
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo(aOther);
mType = TContentPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(ContentPrincipalInfo&& aOther)
{
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo(std::move(aOther));
mType = TContentPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(const SystemPrincipalInfo& aOther)
{
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo(aOther);
mType = TSystemPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(SystemPrincipalInfo&& aOther)
{
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo(std::move(aOther));
mType = TSystemPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(const NullPrincipalInfo& aOther)
{
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo(aOther);
mType = TNullPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(NullPrincipalInfo&& aOther)
{
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo(std::move(aOther));
mType = TNullPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(const ExpandedPrincipalInfo& aOther)
{
ptr_ExpandedPrincipalInfo() = new ExpandedPrincipalInfo(aOther);
mType = TExpandedPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(ExpandedPrincipalInfo&& aOther)
{
ptr_ExpandedPrincipalInfo() = new ExpandedPrincipalInfo(std::move(aOther));
mType = TExpandedPrincipalInfo;
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(const PrincipalInfo& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case TContentPrincipalInfo:
{
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo((aOther).get_ContentPrincipalInfo());
break;
}
case TSystemPrincipalInfo:
{
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo((aOther).get_SystemPrincipalInfo());
break;
}
case TNullPrincipalInfo:
{
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo((aOther).get_NullPrincipalInfo());
break;
}
case TExpandedPrincipalInfo:
{
ptr_ExpandedPrincipalInfo() = new ExpandedPrincipalInfo((aOther).get_ExpandedPrincipalInfo());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT PrincipalInfo::PrincipalInfo(PrincipalInfo&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TContentPrincipalInfo:
{
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo(std::move((aOther).get_ContentPrincipalInfo()));
(aOther).MaybeDestroy();
break;
}
case TSystemPrincipalInfo:
{
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo(std::move((aOther).get_SystemPrincipalInfo()));
(aOther).MaybeDestroy();
break;
}
case TNullPrincipalInfo:
{
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo(std::move((aOther).get_NullPrincipalInfo()));
(aOther).MaybeDestroy();
break;
}
case TExpandedPrincipalInfo:
{
ptr_ExpandedPrincipalInfo() = (aOther).ptr_ExpandedPrincipalInfo();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
PrincipalInfo::~PrincipalInfo()
{
MaybeDestroy();
}
auto PrincipalInfo::operator=(const ContentPrincipalInfo& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo(aRhs);
mType = TContentPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(ContentPrincipalInfo&& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo(std::move(aRhs));
mType = TContentPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(const SystemPrincipalInfo& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo(aRhs);
mType = TSystemPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(SystemPrincipalInfo&& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo(std::move(aRhs));
mType = TSystemPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(const NullPrincipalInfo& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo(aRhs);
mType = TNullPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(NullPrincipalInfo&& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo(std::move(aRhs));
mType = TNullPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(const ExpandedPrincipalInfo& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
ptr_ExpandedPrincipalInfo() = new ExpandedPrincipalInfo(aRhs);
mType = TExpandedPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(ExpandedPrincipalInfo&& aRhs) -> PrincipalInfo&
{
MaybeDestroy();
ptr_ExpandedPrincipalInfo() = new ExpandedPrincipalInfo(std::move(aRhs));
mType = TExpandedPrincipalInfo;
return (*(this));
}
auto PrincipalInfo::operator=(const PrincipalInfo& aRhs) -> PrincipalInfo&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TContentPrincipalInfo:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo((aRhs).get_ContentPrincipalInfo());
break;
}
case TSystemPrincipalInfo:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo((aRhs).get_SystemPrincipalInfo());
break;
}
case TNullPrincipalInfo:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo((aRhs).get_NullPrincipalInfo());
break;
}
case TExpandedPrincipalInfo:
{
MaybeDestroy();
ptr_ExpandedPrincipalInfo() = new ExpandedPrincipalInfo((aRhs).get_ExpandedPrincipalInfo());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto PrincipalInfo::operator=(PrincipalInfo&& aRhs) -> PrincipalInfo&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TContentPrincipalInfo:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ContentPrincipalInfo()) ContentPrincipalInfo(std::move((aRhs).get_ContentPrincipalInfo()));
(aRhs).MaybeDestroy();
break;
}
case TSystemPrincipalInfo:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_SystemPrincipalInfo()) SystemPrincipalInfo(std::move((aRhs).get_SystemPrincipalInfo()));
(aRhs).MaybeDestroy();
break;
}
case TNullPrincipalInfo:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_NullPrincipalInfo()) NullPrincipalInfo(std::move((aRhs).get_NullPrincipalInfo()));
(aRhs).MaybeDestroy();
break;
}
case TExpandedPrincipalInfo:
{
MaybeDestroy();
ptr_ExpandedPrincipalInfo() = (aRhs).ptr_ExpandedPrincipalInfo();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
auto PrincipalInfo::operator==(const ContentPrincipalInfo& aRhs) const -> bool
{
return (get_ContentPrincipalInfo()) == (aRhs);
}
auto PrincipalInfo::operator==(const SystemPrincipalInfo& aRhs) const -> bool
{
return (get_SystemPrincipalInfo()) == (aRhs);
}
auto PrincipalInfo::operator==(const NullPrincipalInfo& aRhs) const -> bool
{
return (get_NullPrincipalInfo()) == (aRhs);
}
auto PrincipalInfo::operator==(const ExpandedPrincipalInfo& aRhs) const -> bool
{
return (get_ExpandedPrincipalInfo()) == (aRhs);
}
auto PrincipalInfo::operator==(const PrincipalInfo& aRhs) const -> bool
{
if ((type()) != ((aRhs).type())) {
return false;
}
switch (type()) {
case TContentPrincipalInfo:
{
return (get_ContentPrincipalInfo()) == ((aRhs).get_ContentPrincipalInfo());
}
case TSystemPrincipalInfo:
{
return (get_SystemPrincipalInfo()) == ((aRhs).get_SystemPrincipalInfo());
}
case TNullPrincipalInfo:
{
return (get_NullPrincipalInfo()) == ((aRhs).get_NullPrincipalInfo());
}
case TExpandedPrincipalInfo:
{
return (get_ExpandedPrincipalInfo()) == ((aRhs).get_ExpandedPrincipalInfo());
}
default:
{
mozilla::ipc::LogicError("unreached");
return false;
}
}
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::PrincipalInfo>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::ipc::PrincipalInfo union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'PrincipalInfo'
(aWriter)->WriteSentinel(606209327);
switch (type) {
case union__::TContentPrincipalInfo:
{
IPC::WriteParam(aWriter, (aVar).get_ContentPrincipalInfo());
// Sentinel = 'TContentPrincipalInfo'
(aWriter)->WriteSentinel(1527842910);
return;
}
case union__::TSystemPrincipalInfo:
{
IPC::WriteParam(aWriter, (aVar).get_SystemPrincipalInfo());
// Sentinel = 'TSystemPrincipalInfo'
(aWriter)->WriteSentinel(1411909640);
return;
}
case union__::TNullPrincipalInfo:
{
IPC::WriteParam(aWriter, (aVar).get_NullPrincipalInfo());
// Sentinel = 'TNullPrincipalInfo'
(aWriter)->WriteSentinel(1120470814);
return;
}
case union__::TExpandedPrincipalInfo:
{
IPC::WriteParam(aWriter, (aVar).get_ExpandedPrincipalInfo());
// Sentinel = 'TExpandedPrincipalInfo'
(aWriter)->WriteSentinel(1652492460);
return;
}
default:
{
aWriter->FatalError("unknown variant of union PrincipalInfo");
return;
}
}
}
auto ParamTraits<::mozilla::ipc::PrincipalInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::ipc::PrincipalInfo union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union PrincipalInfo");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'PrincipalInfo'
if ((!((aReader)->ReadSentinel(606209327)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union PrincipalInfo");
return {};
}
switch (type) {
case union__::TContentPrincipalInfo:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::ipc::ContentPrincipalInfo>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TContentPrincipalInfo of union PrincipalInfo");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TContentPrincipalInfo'
if ((!((aReader)->ReadSentinel(1527842910)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TContentPrincipalInfo of union PrincipalInfo");
return {};
}
return std::move(tmp);
}
case union__::TSystemPrincipalInfo:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::ipc::SystemPrincipalInfo>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TSystemPrincipalInfo of union PrincipalInfo");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TSystemPrincipalInfo'
if ((!((aReader)->ReadSentinel(1411909640)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TSystemPrincipalInfo of union PrincipalInfo");
return {};
}
return std::move(tmp);
}
case union__::TNullPrincipalInfo:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::ipc::NullPrincipalInfo>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TNullPrincipalInfo of union PrincipalInfo");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TNullPrincipalInfo'
if ((!((aReader)->ReadSentinel(1120470814)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TNullPrincipalInfo of union PrincipalInfo");
return {};
}
return std::move(tmp);
}
case union__::TExpandedPrincipalInfo:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::ipc::ExpandedPrincipalInfo>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TExpandedPrincipalInfo of union PrincipalInfo");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TExpandedPrincipalInfo'
if ((!((aReader)->ReadSentinel(1652492460)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TExpandedPrincipalInfo of union PrincipalInfo");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union PrincipalInfo");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct CSPInfo|
//
namespace mozilla {
namespace ipc {
auto CSPInfo::operator==(const CSPInfo& _o) const -> bool
{
if ((!((policyInfos()) == ((_o).policyInfos())))) {
return false;
}
if ((!((requestPrincipalInfo()) == ((_o).requestPrincipalInfo())))) {
return false;
}
if ((!((selfURISpec()) == ((_o).selfURISpec())))) {
return false;
}
if ((!((referrer()) == ((_o).referrer())))) {
return false;
}
if ((!((innerWindowID()) == ((_o).innerWindowID())))) {
return false;
}
if ((!((skipAllowInlineStyleCheck()) == ((_o).skipAllowInlineStyleCheck())))) {
return false;
}
return true;
}
auto CSPInfo::operator!=(const CSPInfo& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::CSPInfo>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).policyInfos());
// Sentinel = 'policyInfos'
(aWriter)->WriteSentinel(460850320);
IPC::WriteParam(aWriter, (aVar).requestPrincipalInfo());
// Sentinel = 'requestPrincipalInfo'
(aWriter)->WriteSentinel(1470892088);
IPC::WriteParam(aWriter, (aVar).selfURISpec());
// Sentinel = 'selfURISpec'
(aWriter)->WriteSentinel(425657382);
IPC::WriteParam(aWriter, (aVar).referrer());
// Sentinel = 'referrer'
(aWriter)->WriteSentinel(252838750);
IPC::WriteParam(aWriter, (aVar).skipAllowInlineStyleCheck());
// Sentinel = 'skipAllowInlineStyleCheck'
(aWriter)->WriteSentinel(2204240389);
(aWriter)->WriteBytes((&((aVar).innerWindowID())), 8);
// Sentinel = 'innerWindowID'
(aWriter)->WriteSentinel(625870114);
}
auto ParamTraits<::mozilla::ipc::CSPInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___policyInfos = IPC::ReadParam<nsTArray<::mozilla::ipc::ContentSecurityPolicy>>(aReader);
if (!maybe___policyInfos) {
aReader->FatalError("Error deserializing 'policyInfos' (ContentSecurityPolicy[]) member of 'CSPInfo'");
return {};
}
auto& _policyInfos = *maybe___policyInfos;
// Sentinel = 'policyInfos'
if ((!((aReader)->ReadSentinel(460850320)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'policyInfos' (ContentSecurityPolicy[]) member of 'CSPInfo'");
return {};
}
auto maybe___requestPrincipalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
if (!maybe___requestPrincipalInfo) {
aReader->FatalError("Error deserializing 'requestPrincipalInfo' (PrincipalInfo) member of 'CSPInfo'");
return {};
}
auto& _requestPrincipalInfo = *maybe___requestPrincipalInfo;
// Sentinel = 'requestPrincipalInfo'
if ((!((aReader)->ReadSentinel(1470892088)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'requestPrincipalInfo' (PrincipalInfo) member of 'CSPInfo'");
return {};
}
auto maybe___selfURISpec = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___selfURISpec) {
aReader->FatalError("Error deserializing 'selfURISpec' (nsCString) member of 'CSPInfo'");
return {};
}
auto& _selfURISpec = *maybe___selfURISpec;
// Sentinel = 'selfURISpec'
if ((!((aReader)->ReadSentinel(425657382)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'selfURISpec' (nsCString) member of 'CSPInfo'");
return {};
}
auto maybe___referrer = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___referrer) {
aReader->FatalError("Error deserializing 'referrer' (nsCString) member of 'CSPInfo'");
return {};
}
auto& _referrer = *maybe___referrer;
// Sentinel = 'referrer'
if ((!((aReader)->ReadSentinel(252838750)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'referrer' (nsCString) member of 'CSPInfo'");
return {};
}
auto maybe___skipAllowInlineStyleCheck = IPC::ReadParam<bool>(aReader);
if (!maybe___skipAllowInlineStyleCheck) {
aReader->FatalError("Error deserializing 'skipAllowInlineStyleCheck' (bool) member of 'CSPInfo'");
return {};
}
auto& _skipAllowInlineStyleCheck = *maybe___skipAllowInlineStyleCheck;
// Sentinel = 'skipAllowInlineStyleCheck'
if ((!((aReader)->ReadSentinel(2204240389)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'skipAllowInlineStyleCheck' (bool) member of 'CSPInfo'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_policyInfos),
std::move(_requestPrincipalInfo),
std::move(_selfURISpec),
std::move(_referrer),
::uint64_t{0},
std::move(_skipAllowInlineStyleCheck)};
if ((!((aReader)->ReadBytesInto((&((result__)->innerWindowID())), 8)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'innerWindowID'
if ((!((aReader)->ReadSentinel(625870114)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct WebTransportHash|
//
namespace mozilla {
namespace ipc {
auto WebTransportHash::operator==(const WebTransportHash& _o) const -> bool
{
if ((!((algorithm()) == ((_o).algorithm())))) {
return false;
}
if ((!((value()) == ((_o).value())))) {
return false;
}
return true;
}
auto WebTransportHash::operator!=(const WebTransportHash& _o) const -> bool
{
return (!(operator==(_o)));
}
} // namespace ipc
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::ipc::WebTransportHash>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).algorithm());
// Sentinel = 'algorithm'
(aWriter)->WriteSentinel(313787336);
IPC::WriteParam(aWriter, (aVar).value());
// Sentinel = 'value'
(aWriter)->WriteSentinel(107610654);
}
auto ParamTraits<::mozilla::ipc::WebTransportHash>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___algorithm = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___algorithm) {
aReader->FatalError("Error deserializing 'algorithm' (nsCString) member of 'WebTransportHash'");
return {};
}
auto& _algorithm = *maybe___algorithm;
// Sentinel = 'algorithm'
if ((!((aReader)->ReadSentinel(313787336)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'algorithm' (nsCString) member of 'WebTransportHash'");
return {};
}
auto maybe___value = IPC::ReadParam<nsTArray<::uint8_t>>(aReader);
if (!maybe___value) {
aReader->FatalError("Error deserializing 'value' (uint8_t[]) member of 'WebTransportHash'");
return {};
}
auto& _value = *maybe___value;
// Sentinel = 'value'
if ((!((aReader)->ReadSentinel(107610654)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'value' (uint8_t[]) member of 'WebTransportHash'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_algorithm),
std::move(_value)};
return result__;
}
} // namespace IPC