Copy as Markdown
Other Tools
//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/TabMessageUtils.h"
#include "mozilla/dom/notification/IPCUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/FeaturePolicyUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/net/CacheInfoIPCTypes.h"
#include "mozilla/AntiTrackingIPCUtils.h"
#include "mozilla/net/ClassOfService.h"
#include "mozilla/dom/IPCTransferable.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 IPCTransferableDataString|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataString>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, std::move((aVar).data()));
// Sentinel = 'data'
(aWriter)->WriteSentinel(67109275);
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataString>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___data = IPC::ReadParam<::mozilla::ipc::BigBuffer>(aReader);
if (!maybe___data) {
aReader->FatalError("Error deserializing 'data' (BigBuffer) member of 'IPCTransferableDataString'");
return {};
}
auto& _data = *maybe___data;
// Sentinel = 'data'
if ((!((aReader)->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'data' (BigBuffer) member of 'IPCTransferableDataString'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_data)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferableDataCString|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataCString>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, std::move((aVar).data()));
// Sentinel = 'data'
(aWriter)->WriteSentinel(67109275);
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataCString>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___data = IPC::ReadParam<::mozilla::ipc::BigBuffer>(aReader);
if (!maybe___data) {
aReader->FatalError("Error deserializing 'data' (BigBuffer) member of 'IPCTransferableDataCString'");
return {};
}
auto& _data = *maybe___data;
// Sentinel = 'data'
if ((!((aReader)->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'data' (BigBuffer) member of 'IPCTransferableDataCString'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_data)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferableDataInputStream|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataInputStream>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, std::move((aVar).data()));
// Sentinel = 'data'
(aWriter)->WriteSentinel(67109275);
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataInputStream>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___data = IPC::ReadParam<::mozilla::ipc::BigBuffer>(aReader);
if (!maybe___data) {
aReader->FatalError("Error deserializing 'data' (BigBuffer) member of 'IPCTransferableDataInputStream'");
return {};
}
auto& _data = *maybe___data;
// Sentinel = 'data'
if ((!((aReader)->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'data' (BigBuffer) member of 'IPCTransferableDataInputStream'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_data)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferableDataImageContainer|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataImageContainer>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, std::move((aVar).image()));
// Sentinel = 'image'
(aWriter)->WriteSentinel(102498820);
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataImageContainer>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___image = IPC::ReadParam<::mozilla::dom::IPCImage>(aReader);
if (!maybe___image) {
aReader->FatalError("Error deserializing 'image' (IPCImage) member of 'IPCTransferableDataImageContainer'");
return {};
}
auto& _image = *maybe___image;
// Sentinel = 'image'
if ((!((aReader)->ReadSentinel(102498820)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'image' (IPCImage) member of 'IPCTransferableDataImageContainer'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_image)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferableDataBlob|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataBlob>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).blob());
// Sentinel = 'blob'
(aWriter)->WriteSentinel(68157856);
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataBlob>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___blob = IPC::ReadParam<::mozilla::dom::IPCBlob>(aReader);
if (!maybe___blob) {
aReader->FatalError("Error deserializing 'blob' (IPCBlob) member of 'IPCTransferableDataBlob'");
return {};
}
auto& _blob = *maybe___blob;
// Sentinel = 'blob'
if ((!((aReader)->ReadSentinel(68157856)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'blob' (IPCBlob) member of 'IPCTransferableDataBlob'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_blob)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union IPCTransferableDataType|
//
namespace mozilla {
namespace dom {
auto IPCTransferableDataType::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TIPCTransferableDataString:
{
(ptr_IPCTransferableDataString())->~IPCTransferableDataString__tdef();
break;
}
case TIPCTransferableDataCString:
{
(ptr_IPCTransferableDataCString())->~IPCTransferableDataCString__tdef();
break;
}
case TIPCTransferableDataInputStream:
{
(ptr_IPCTransferableDataInputStream())->~IPCTransferableDataInputStream__tdef();
break;
}
case TIPCTransferableDataImageContainer:
{
(ptr_IPCTransferableDataImageContainer())->~IPCTransferableDataImageContainer__tdef();
break;
}
case TIPCTransferableDataBlob:
{
(ptr_IPCTransferableDataBlob())->~IPCTransferableDataBlob__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(IPCTransferableDataString&& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataString()) IPCTransferableDataString(std::move(aOther));
mType = TIPCTransferableDataString;
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(IPCTransferableDataCString&& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataCString()) IPCTransferableDataCString(std::move(aOther));
mType = TIPCTransferableDataCString;
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(IPCTransferableDataInputStream&& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataInputStream()) IPCTransferableDataInputStream(std::move(aOther));
mType = TIPCTransferableDataInputStream;
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(IPCTransferableDataImageContainer&& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataImageContainer()) IPCTransferableDataImageContainer(std::move(aOther));
mType = TIPCTransferableDataImageContainer;
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(const IPCTransferableDataBlob& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataBlob()) IPCTransferableDataBlob(aOther);
mType = TIPCTransferableDataBlob;
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(IPCTransferableDataBlob&& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataBlob()) IPCTransferableDataBlob(std::move(aOther));
mType = TIPCTransferableDataBlob;
}
MOZ_IMPLICIT IPCTransferableDataType::IPCTransferableDataType(IPCTransferableDataType&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TIPCTransferableDataString:
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataString()) IPCTransferableDataString(std::move((aOther).get_IPCTransferableDataString()));
(aOther).MaybeDestroy();
break;
}
case TIPCTransferableDataCString:
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataCString()) IPCTransferableDataCString(std::move((aOther).get_IPCTransferableDataCString()));
(aOther).MaybeDestroy();
break;
}
case TIPCTransferableDataInputStream:
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataInputStream()) IPCTransferableDataInputStream(std::move((aOther).get_IPCTransferableDataInputStream()));
(aOther).MaybeDestroy();
break;
}
case TIPCTransferableDataImageContainer:
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataImageContainer()) IPCTransferableDataImageContainer(std::move((aOther).get_IPCTransferableDataImageContainer()));
(aOther).MaybeDestroy();
break;
}
case TIPCTransferableDataBlob:
{
new (mozilla::KnownNotNull, ptr_IPCTransferableDataBlob()) IPCTransferableDataBlob(std::move((aOther).get_IPCTransferableDataBlob()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
IPCTransferableDataType::~IPCTransferableDataType()
{
MaybeDestroy();
}
auto IPCTransferableDataType::operator=(IPCTransferableDataString&& aRhs) -> IPCTransferableDataType&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataString()) IPCTransferableDataString(std::move(aRhs));
mType = TIPCTransferableDataString;
return (*(this));
}
auto IPCTransferableDataType::operator=(IPCTransferableDataCString&& aRhs) -> IPCTransferableDataType&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataCString()) IPCTransferableDataCString(std::move(aRhs));
mType = TIPCTransferableDataCString;
return (*(this));
}
auto IPCTransferableDataType::operator=(IPCTransferableDataInputStream&& aRhs) -> IPCTransferableDataType&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataInputStream()) IPCTransferableDataInputStream(std::move(aRhs));
mType = TIPCTransferableDataInputStream;
return (*(this));
}
auto IPCTransferableDataType::operator=(IPCTransferableDataImageContainer&& aRhs) -> IPCTransferableDataType&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataImageContainer()) IPCTransferableDataImageContainer(std::move(aRhs));
mType = TIPCTransferableDataImageContainer;
return (*(this));
}
auto IPCTransferableDataType::operator=(const IPCTransferableDataBlob& aRhs) -> IPCTransferableDataType&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataBlob()) IPCTransferableDataBlob(aRhs);
mType = TIPCTransferableDataBlob;
return (*(this));
}
auto IPCTransferableDataType::operator=(IPCTransferableDataBlob&& aRhs) -> IPCTransferableDataType&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataBlob()) IPCTransferableDataBlob(std::move(aRhs));
mType = TIPCTransferableDataBlob;
return (*(this));
}
auto IPCTransferableDataType::operator=(IPCTransferableDataType&& aRhs) -> IPCTransferableDataType&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TIPCTransferableDataString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataString()) IPCTransferableDataString(std::move((aRhs).get_IPCTransferableDataString()));
(aRhs).MaybeDestroy();
break;
}
case TIPCTransferableDataCString:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataCString()) IPCTransferableDataCString(std::move((aRhs).get_IPCTransferableDataCString()));
(aRhs).MaybeDestroy();
break;
}
case TIPCTransferableDataInputStream:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataInputStream()) IPCTransferableDataInputStream(std::move((aRhs).get_IPCTransferableDataInputStream()));
(aRhs).MaybeDestroy();
break;
}
case TIPCTransferableDataImageContainer:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataImageContainer()) IPCTransferableDataImageContainer(std::move((aRhs).get_IPCTransferableDataImageContainer()));
(aRhs).MaybeDestroy();
break;
}
case TIPCTransferableDataBlob:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableDataBlob()) IPCTransferableDataBlob(std::move((aRhs).get_IPCTransferableDataBlob()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataType>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
typedef ::mozilla::dom::IPCTransferableDataType union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'IPCTransferableDataType'
(aWriter)->WriteSentinel(1720715474);
switch (type) {
case union__::TIPCTransferableDataString:
{
IPC::WriteParam(aWriter, std::move((aVar).get_IPCTransferableDataString()));
// Sentinel = 'TIPCTransferableDataString'
(aWriter)->WriteSentinel(2180319739);
return;
}
case union__::TIPCTransferableDataCString:
{
IPC::WriteParam(aWriter, std::move((aVar).get_IPCTransferableDataCString()));
// Sentinel = 'TIPCTransferableDataCString'
(aWriter)->WriteSentinel(2337147454);
return;
}
case union__::TIPCTransferableDataInputStream:
{
IPC::WriteParam(aWriter, std::move((aVar).get_IPCTransferableDataInputStream()));
// Sentinel = 'TIPCTransferableDataInputStream'
(aWriter)->WriteSentinel(3114011648);
return;
}
case union__::TIPCTransferableDataImageContainer:
{
IPC::WriteParam(aWriter, std::move((aVar).get_IPCTransferableDataImageContainer()));
// Sentinel = 'TIPCTransferableDataImageContainer'
(aWriter)->WriteSentinel(3718712586);
return;
}
case union__::TIPCTransferableDataBlob:
{
IPC::WriteParam(aWriter, (aVar).get_IPCTransferableDataBlob());
// Sentinel = 'TIPCTransferableDataBlob'
(aWriter)->WriteSentinel(1845299459);
return;
}
default:
{
aWriter->FatalError("unknown variant of union IPCTransferableDataType");
return;
}
}
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataType>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::IPCTransferableDataType union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union IPCTransferableDataType");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'IPCTransferableDataType'
if ((!((aReader)->ReadSentinel(1720715474)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union IPCTransferableDataType");
return {};
}
switch (type) {
case union__::TIPCTransferableDataString:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCTransferableDataString>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIPCTransferableDataString of union IPCTransferableDataType");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIPCTransferableDataString'
if ((!((aReader)->ReadSentinel(2180319739)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIPCTransferableDataString of union IPCTransferableDataType");
return {};
}
return std::move(tmp);
}
case union__::TIPCTransferableDataCString:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCTransferableDataCString>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIPCTransferableDataCString of union IPCTransferableDataType");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIPCTransferableDataCString'
if ((!((aReader)->ReadSentinel(2337147454)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIPCTransferableDataCString of union IPCTransferableDataType");
return {};
}
return std::move(tmp);
}
case union__::TIPCTransferableDataInputStream:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCTransferableDataInputStream>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIPCTransferableDataInputStream of union IPCTransferableDataType");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIPCTransferableDataInputStream'
if ((!((aReader)->ReadSentinel(3114011648)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIPCTransferableDataInputStream of union IPCTransferableDataType");
return {};
}
return std::move(tmp);
}
case union__::TIPCTransferableDataImageContainer:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCTransferableDataImageContainer>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIPCTransferableDataImageContainer of union IPCTransferableDataType");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIPCTransferableDataImageContainer'
if ((!((aReader)->ReadSentinel(3718712586)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIPCTransferableDataImageContainer of union IPCTransferableDataType");
return {};
}
return std::move(tmp);
}
case union__::TIPCTransferableDataBlob:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCTransferableDataBlob>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIPCTransferableDataBlob of union IPCTransferableDataType");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIPCTransferableDataBlob'
if ((!((aReader)->ReadSentinel(1845299459)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIPCTransferableDataBlob of union IPCTransferableDataType");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union IPCTransferableDataType");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferableDataItem|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataItem>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).flavor());
// Sentinel = 'flavor'
(aWriter)->WriteSentinel(146539147);
IPC::WriteParam(aWriter, std::move((aVar).data()));
// Sentinel = 'data'
(aWriter)->WriteSentinel(67109275);
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataItem>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___flavor = IPC::ReadParam<::nsCString>(aReader);
if (!maybe___flavor) {
aReader->FatalError("Error deserializing 'flavor' (nsCString) member of 'IPCTransferableDataItem'");
return {};
}
auto& _flavor = *maybe___flavor;
// Sentinel = 'flavor'
if ((!((aReader)->ReadSentinel(146539147)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'flavor' (nsCString) member of 'IPCTransferableDataItem'");
return {};
}
auto maybe___data = IPC::ReadParam<::mozilla::dom::IPCTransferableDataType>(aReader);
if (!maybe___data) {
aReader->FatalError("Error deserializing 'data' (IPCTransferableDataType) member of 'IPCTransferableDataItem'");
return {};
}
auto& _data = *maybe___data;
// Sentinel = 'data'
if ((!((aReader)->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'data' (IPCTransferableDataType) member of 'IPCTransferableDataItem'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_flavor),
std::move(_data)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferableData|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableData>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, std::move((aVar).items()));
// Sentinel = 'items'
(aWriter)->WriteSentinel(106824227);
}
auto ParamTraits<::mozilla::dom::IPCTransferableData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___items = IPC::ReadParam<nsTArray<::mozilla::dom::IPCTransferableDataItem>>(aReader);
if (!maybe___items) {
aReader->FatalError("Error deserializing 'items' (IPCTransferableDataItem[]) member of 'IPCTransferableData'");
return {};
}
auto& _items = *maybe___items;
// Sentinel = 'items'
if ((!((aReader)->ReadSentinel(106824227)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'items' (IPCTransferableDataItem[]) member of 'IPCTransferableData'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_items)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union IPCTransferableDataOrError|
//
namespace mozilla {
namespace dom {
auto IPCTransferableDataOrError::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case TIPCTransferableData:
{
(ptr_IPCTransferableData())->~IPCTransferableData__tdef();
break;
}
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT IPCTransferableDataOrError::IPCTransferableDataOrError(IPCTransferableData&& aOther)
{
new (mozilla::KnownNotNull, ptr_IPCTransferableData()) IPCTransferableData(std::move(aOther));
mType = TIPCTransferableData;
}
MOZ_IMPLICIT IPCTransferableDataOrError::IPCTransferableDataOrError(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT IPCTransferableDataOrError::IPCTransferableDataOrError(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT IPCTransferableDataOrError::IPCTransferableDataOrError(IPCTransferableDataOrError&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case TIPCTransferableData:
{
new (mozilla::KnownNotNull, ptr_IPCTransferableData()) IPCTransferableData(std::move((aOther).get_IPCTransferableData()));
(aOther).MaybeDestroy();
break;
}
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
IPCTransferableDataOrError::~IPCTransferableDataOrError()
{
MaybeDestroy();
}
auto IPCTransferableDataOrError::operator=(IPCTransferableData&& aRhs) -> IPCTransferableDataOrError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableData()) IPCTransferableData(std::move(aRhs));
mType = TIPCTransferableData;
return (*(this));
}
auto IPCTransferableDataOrError::operator=(const nsresult& aRhs) -> IPCTransferableDataOrError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto IPCTransferableDataOrError::operator=(nsresult&& aRhs) -> IPCTransferableDataOrError&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto IPCTransferableDataOrError::operator=(IPCTransferableDataOrError&& aRhs) -> IPCTransferableDataOrError&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case TIPCTransferableData:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_IPCTransferableData()) IPCTransferableData(std::move((aRhs).get_IPCTransferableData()));
(aRhs).MaybeDestroy();
break;
}
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferableDataOrError>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
typedef ::mozilla::dom::IPCTransferableDataOrError union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'IPCTransferableDataOrError'
(aWriter)->WriteSentinel(2193361403);
switch (type) {
case union__::TIPCTransferableData:
{
IPC::WriteParam(aWriter, std::move((aVar).get_IPCTransferableData()));
// Sentinel = 'TIPCTransferableData'
(aWriter)->WriteSentinel(1281427332);
return;
}
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
default:
{
aWriter->FatalError("unknown variant of union IPCTransferableDataOrError");
return;
}
}
}
auto ParamTraits<::mozilla::dom::IPCTransferableDataOrError>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::IPCTransferableDataOrError union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union IPCTransferableDataOrError");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'IPCTransferableDataOrError'
if ((!((aReader)->ReadSentinel(2193361403)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union IPCTransferableDataOrError");
return {};
}
switch (type) {
case union__::TIPCTransferableData:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::IPCTransferableData>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TIPCTransferableData of union IPCTransferableDataOrError");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TIPCTransferableData'
if ((!((aReader)->ReadSentinel(1281427332)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TIPCTransferableData of union IPCTransferableDataOrError");
return {};
}
return std::move(tmp);
}
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union IPCTransferableDataOrError");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union IPCTransferableDataOrError");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union IPCTransferableDataOrError");
return {};
}
}
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct IPCTransferable|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::IPCTransferable>::Write(
IPC::MessageWriter* aWriter,
paramType&& aVar) -> void
{
IPC::WriteParam(aWriter, std::move((aVar).data()));
// Sentinel = 'data'
(aWriter)->WriteSentinel(67109275);
IPC::WriteParam(aWriter, (aVar).isPrivateData());
// Sentinel = 'isPrivateData'
(aWriter)->WriteSentinel(618595634);
IPC::WriteParam(aWriter, (aVar).dataPrincipal());
// Sentinel = 'dataPrincipal'
(aWriter)->WriteSentinel(609682749);
IPC::WriteParam(aWriter, (aVar).cookieJarSettings());
// Sentinel = 'cookieJarSettings'
(aWriter)->WriteSentinel(1031800553);
IPC::WriteParam(aWriter, (aVar).contentPolicyType());
// Sentinel = 'contentPolicyType'
(aWriter)->WriteSentinel(1066927886);
IPC::WriteParam(aWriter, (aVar).referrerInfo());
// Sentinel = 'referrerInfo'
(aWriter)->WriteSentinel(540214506);
}
auto ParamTraits<::mozilla::dom::IPCTransferable>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___data = IPC::ReadParam<::mozilla::dom::IPCTransferableData>(aReader);
if (!maybe___data) {
aReader->FatalError("Error deserializing 'data' (IPCTransferableData) member of 'IPCTransferable'");
return {};
}
auto& _data = *maybe___data;
// Sentinel = 'data'
if ((!((aReader)->ReadSentinel(67109275)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'data' (IPCTransferableData) member of 'IPCTransferable'");
return {};
}
auto maybe___isPrivateData = IPC::ReadParam<bool>(aReader);
if (!maybe___isPrivateData) {
aReader->FatalError("Error deserializing 'isPrivateData' (bool) member of 'IPCTransferable'");
return {};
}
auto& _isPrivateData = *maybe___isPrivateData;
// Sentinel = 'isPrivateData'
if ((!((aReader)->ReadSentinel(618595634)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'isPrivateData' (bool) member of 'IPCTransferable'");
return {};
}
auto maybe___dataPrincipal = IPC::ReadParam<RefPtr<::nsIPrincipal>>(aReader);
if (!maybe___dataPrincipal) {
aReader->FatalError("Error deserializing 'dataPrincipal' (nsIPrincipal) member of 'IPCTransferable'");
return {};
}
auto& _dataPrincipal = *maybe___dataPrincipal;
// Sentinel = 'dataPrincipal'
if ((!((aReader)->ReadSentinel(609682749)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'dataPrincipal' (nsIPrincipal) member of 'IPCTransferable'");
return {};
}
auto maybe___cookieJarSettings = IPC::ReadParam<mozilla::Maybe<::mozilla::net::CookieJarSettingsArgs>>(aReader);
if (!maybe___cookieJarSettings) {
aReader->FatalError("Error deserializing 'cookieJarSettings' (CookieJarSettingsArgs?) member of 'IPCTransferable'");
return {};
}
auto& _cookieJarSettings = *maybe___cookieJarSettings;
// Sentinel = 'cookieJarSettings'
if ((!((aReader)->ReadSentinel(1031800553)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'cookieJarSettings' (CookieJarSettingsArgs?) member of 'IPCTransferable'");
return {};
}
auto maybe___contentPolicyType = IPC::ReadParam<::nsContentPolicyType>(aReader);
if (!maybe___contentPolicyType) {
aReader->FatalError("Error deserializing 'contentPolicyType' (nsContentPolicyType) member of 'IPCTransferable'");
return {};
}
auto& _contentPolicyType = *maybe___contentPolicyType;
// Sentinel = 'contentPolicyType'
if ((!((aReader)->ReadSentinel(1066927886)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'contentPolicyType' (nsContentPolicyType) member of 'IPCTransferable'");
return {};
}
auto maybe___referrerInfo = IPC::ReadParam<RefPtr<::nsIReferrerInfo>>(aReader);
if (!maybe___referrerInfo) {
aReader->FatalError("Error deserializing 'referrerInfo' (nsIReferrerInfo) member of 'IPCTransferable'");
return {};
}
auto& _referrerInfo = *maybe___referrerInfo;
// Sentinel = 'referrerInfo'
if ((!((aReader)->ReadSentinel(540214506)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'referrerInfo' (nsIReferrerInfo) member of 'IPCTransferable'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_data),
std::move(_isPrivateData),
std::move(_dataPrincipal),
std::move(_cookieJarSettings),
std::move(_contentPolicyType),
std::move(_referrerInfo)};
return result__;
}
} // namespace IPC