Copy as Markdown

Other Tools

//
// Automatically generated by ipdlc.
// Edit at your own risk
//
#include "mozilla/dom/quota/SerializationHelpers.h"
#include "mozilla/dom/quota/PQuotaParent.h"
#include "mozilla/dom/quota/PQuotaChild.h"
#include "mozilla/dom/quota/PQuotaRequest.h"
#include "mozilla/dom/quota/PQuotaRequestParent.h"
#include "mozilla/dom/quota/PQuotaRequestChild.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 dom {
namespace quota {
namespace PQuotaRequest {
nsresult
CreateEndpoints(
base::ProcessId aParentDestPid,
base::ProcessId aChildDestPid,
mozilla::ipc::Endpoint<::mozilla::dom::quota::PQuotaRequestParent>* aParent,
mozilla::ipc::Endpoint<::mozilla::dom::quota::PQuotaRequestChild>* aChild)
{
return mozilla::ipc::CreateEndpoints(
mozilla::ipc::PrivateIPDLInterface(),
aParentDestPid, aChildDestPid, aParent, aChild);
}
mozilla::UniquePtr<IPC::Message>
Msg___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Msg___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::NOT_REPLY));
}
mozilla::UniquePtr<IPC::Message>
Reply___delete__(int32_t routingId)
{
return IPC::Message::IPDLMessage(routingId, Reply___delete____ID, 0, IPC::Message::HeaderFlags(IPC::Message::NOT_NESTED, IPC::Message::NORMAL_PRIORITY, IPC::Message::COMPRESSION_NONE, IPC::Message::EAGER_SEND, IPC::Message::NOT_CONSTRUCTOR, IPC::Message::ASYNC, IPC::Message::REPLY));
}
} // namespace PQuotaRequest
} // namespace quota
} // namespace dom
} // namespace mozilla
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct StorageNameResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::StorageNameResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).name());
// Sentinel = 'name'
(aWriter)->WriteSentinel(69075362);
}
auto ParamTraits<::mozilla::dom::quota::StorageNameResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___name = IPC::ReadParam<::nsString>(aReader);
if (!maybe___name) {
aReader->FatalError("Error deserializing 'name' (nsString) member of 'StorageNameResponse'");
return {};
}
auto& _name = *maybe___name;
// Sentinel = 'name'
if ((!((aReader)->ReadSentinel(69075362)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'StorageNameResponse'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_name)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct InitializePersistentOriginResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::InitializePersistentOriginResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).created());
// Sentinel = 'created'
(aWriter)->WriteSentinel(191824601);
}
auto ParamTraits<::mozilla::dom::quota::InitializePersistentOriginResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___created = IPC::ReadParam<bool>(aReader);
if (!maybe___created) {
aReader->FatalError("Error deserializing 'created' (bool) member of 'InitializePersistentOriginResponse'");
return {};
}
auto& _created = *maybe___created;
// Sentinel = 'created'
if ((!((aReader)->ReadSentinel(191824601)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'created' (bool) member of 'InitializePersistentOriginResponse'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_created)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct InitializeTemporaryOriginResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::InitializeTemporaryOriginResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).created());
// Sentinel = 'created'
(aWriter)->WriteSentinel(191824601);
}
auto ParamTraits<::mozilla::dom::quota::InitializeTemporaryOriginResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___created = IPC::ReadParam<bool>(aReader);
if (!maybe___created) {
aReader->FatalError("Error deserializing 'created' (bool) member of 'InitializeTemporaryOriginResponse'");
return {};
}
auto& _created = *maybe___created;
// Sentinel = 'created'
if ((!((aReader)->ReadSentinel(191824601)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'created' (bool) member of 'InitializeTemporaryOriginResponse'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_created)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct GetFullOriginMetadataResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::GetFullOriginMetadataResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).maybeFullOriginMetadata());
// Sentinel = 'maybeFullOriginMetadata'
(aWriter)->WriteSentinel(1849821483);
}
auto ParamTraits<::mozilla::dom::quota::GetFullOriginMetadataResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___maybeFullOriginMetadata = IPC::ReadParam<mozilla::Maybe<::mozilla::dom::quota::FullOriginMetadata>>(aReader);
if (!maybe___maybeFullOriginMetadata) {
aReader->FatalError("Error deserializing 'maybeFullOriginMetadata' (FullOriginMetadata?) member of 'GetFullOriginMetadataResponse'");
return {};
}
auto& _maybeFullOriginMetadata = *maybe___maybeFullOriginMetadata;
// Sentinel = 'maybeFullOriginMetadata'
if ((!((aReader)->ReadSentinel(1849821483)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'maybeFullOriginMetadata' (FullOriginMetadata?) member of 'GetFullOriginMetadataResponse'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_maybeFullOriginMetadata)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ResetOriginResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::ResetOriginResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
}
auto ParamTraits<::mozilla::dom::quota::ResetOriginResponse>::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 PersistedResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::PersistedResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).persisted());
// Sentinel = 'persisted'
(aWriter)->WriteSentinel(324273108);
}
auto ParamTraits<::mozilla::dom::quota::PersistedResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___persisted = IPC::ReadParam<bool>(aReader);
if (!maybe___persisted) {
aReader->FatalError("Error deserializing 'persisted' (bool) member of 'PersistedResponse'");
return {};
}
auto& _persisted = *maybe___persisted;
// Sentinel = 'persisted'
if ((!((aReader)->ReadSentinel(324273108)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'persisted' (bool) member of 'PersistedResponse'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_persisted)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct PersistResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::PersistResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
}
auto ParamTraits<::mozilla::dom::quota::PersistResponse>::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 EstimateResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
auto EstimateResponse::StaticAssertions() const -> void
{
static_assert(
(offsetof(EstimateResponse, limit_) - offsetof(EstimateResponse, usage_)) == 8,
"Bad assumptions about field layout!");
}
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::EstimateResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
(aWriter)->WriteBytes((&((aVar).usage())), 16);
// Sentinel = 'usage | limit'
(aWriter)->WriteSentinel(579929329);
}
auto ParamTraits<::mozilla::dom::quota::EstimateResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
IPC::ReadResult<paramType> result__{
std::in_place,
::uint64_t{0},
::uint64_t{0}};
if ((!((aReader)->ReadBytesInto((&((result__)->usage())), 16)))) {
aReader->FatalError("Error bulk reading fields from uint64_t");
return {};
}
// Sentinel = 'usage | limit'
if ((!((aReader)->ReadSentinel(579929329)))) {
mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
return {};
}
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ListOriginsResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::ListOriginsResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
IPC::WriteParam(aWriter, (aVar).origins());
// Sentinel = 'origins'
(aWriter)->WriteSentinel(200213244);
}
auto ParamTraits<::mozilla::dom::quota::ListOriginsResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
auto maybe___origins = IPC::ReadParam<nsTArray<::nsCString>>(aReader);
if (!maybe___origins) {
aReader->FatalError("Error deserializing 'origins' (nsCString[]) member of 'ListOriginsResponse'");
return {};
}
auto& _origins = *maybe___origins;
// Sentinel = 'origins'
if ((!((aReader)->ReadSentinel(200213244)))) {
mozilla::ipc::SentinelReadError("Error deserializing 'origins' (nsCString[]) member of 'ListOriginsResponse'");
return {};
}
IPC::ReadResult<paramType> result__{
std::in_place,
std::move(_origins)};
return result__;
}
} // namespace IPC
//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union RequestResponse|
//
namespace mozilla {
namespace dom {
namespace quota {
auto RequestResponse::MaybeDestroy() -> void
{
if ((mType) == (T__None)) {
return;
}
switch (mType) {
case Tnsresult:
{
(ptr_nsresult())->~nsresult__tdef();
break;
}
case TStorageNameResponse:
{
(ptr_StorageNameResponse())->~StorageNameResponse__tdef();
break;
}
case TInitializePersistentOriginResponse:
{
(ptr_InitializePersistentOriginResponse())->~InitializePersistentOriginResponse__tdef();
break;
}
case TInitializeTemporaryOriginResponse:
{
(ptr_InitializeTemporaryOriginResponse())->~InitializeTemporaryOriginResponse__tdef();
break;
}
case TGetFullOriginMetadataResponse:
{
(ptr_GetFullOriginMetadataResponse())->~GetFullOriginMetadataResponse__tdef();
break;
}
case TResetOriginResponse:
{
(ptr_ResetOriginResponse())->~ResetOriginResponse__tdef();
break;
}
case TPersistedResponse:
{
(ptr_PersistedResponse())->~PersistedResponse__tdef();
break;
}
case TPersistResponse:
{
(ptr_PersistResponse())->~PersistResponse__tdef();
break;
}
case TEstimateResponse:
{
(ptr_EstimateResponse())->~EstimateResponse__tdef();
break;
}
case TListOriginsResponse:
{
(ptr_ListOriginsResponse())->~ListOriginsResponse__tdef();
break;
}
default:
{
mozilla::ipc::LogicError("not reached");
break;
}
}
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const nsresult& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
mType = Tnsresult;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(nsresult&& aOther)
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
mType = Tnsresult;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const StorageNameResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse(aOther);
mType = TStorageNameResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(StorageNameResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse(std::move(aOther));
mType = TStorageNameResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const InitializePersistentOriginResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse(aOther);
mType = TInitializePersistentOriginResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(InitializePersistentOriginResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse(std::move(aOther));
mType = TInitializePersistentOriginResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const InitializeTemporaryOriginResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse(aOther);
mType = TInitializeTemporaryOriginResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(InitializeTemporaryOriginResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse(std::move(aOther));
mType = TInitializeTemporaryOriginResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const GetFullOriginMetadataResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse(aOther);
mType = TGetFullOriginMetadataResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(GetFullOriginMetadataResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse(std::move(aOther));
mType = TGetFullOriginMetadataResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const ResetOriginResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse(aOther);
mType = TResetOriginResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(ResetOriginResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse(std::move(aOther));
mType = TResetOriginResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const PersistedResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse(aOther);
mType = TPersistedResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(PersistedResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse(std::move(aOther));
mType = TPersistedResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const PersistResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse(aOther);
mType = TPersistResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(PersistResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse(std::move(aOther));
mType = TPersistResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const EstimateResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse(aOther);
mType = TEstimateResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(EstimateResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse(std::move(aOther));
mType = TEstimateResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const ListOriginsResponse& aOther)
{
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse(aOther);
mType = TListOriginsResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(ListOriginsResponse&& aOther)
{
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse(std::move(aOther));
mType = TListOriginsResponse;
}
MOZ_IMPLICIT RequestResponse::RequestResponse(const RequestResponse& aOther)
{
(aOther).AssertSanity();
switch ((aOther).type()) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
break;
}
case TStorageNameResponse:
{
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse((aOther).get_StorageNameResponse());
break;
}
case TInitializePersistentOriginResponse:
{
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse((aOther).get_InitializePersistentOriginResponse());
break;
}
case TInitializeTemporaryOriginResponse:
{
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse((aOther).get_InitializeTemporaryOriginResponse());
break;
}
case TGetFullOriginMetadataResponse:
{
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse((aOther).get_GetFullOriginMetadataResponse());
break;
}
case TResetOriginResponse:
{
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse((aOther).get_ResetOriginResponse());
break;
}
case TPersistedResponse:
{
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse((aOther).get_PersistedResponse());
break;
}
case TPersistResponse:
{
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse((aOther).get_PersistResponse());
break;
}
case TEstimateResponse:
{
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse((aOther).get_EstimateResponse());
break;
}
case TListOriginsResponse:
{
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse((aOther).get_ListOriginsResponse());
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
mType = (aOther).type();
}
MOZ_IMPLICIT RequestResponse::RequestResponse(RequestResponse&& aOther)
{
(aOther).AssertSanity();
Type t = (aOther).type();
switch (t) {
case Tnsresult:
{
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aOther).get_nsresult()));
(aOther).MaybeDestroy();
break;
}
case TStorageNameResponse:
{
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse(std::move((aOther).get_StorageNameResponse()));
(aOther).MaybeDestroy();
break;
}
case TInitializePersistentOriginResponse:
{
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse(std::move((aOther).get_InitializePersistentOriginResponse()));
(aOther).MaybeDestroy();
break;
}
case TInitializeTemporaryOriginResponse:
{
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse(std::move((aOther).get_InitializeTemporaryOriginResponse()));
(aOther).MaybeDestroy();
break;
}
case TGetFullOriginMetadataResponse:
{
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse(std::move((aOther).get_GetFullOriginMetadataResponse()));
(aOther).MaybeDestroy();
break;
}
case TResetOriginResponse:
{
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse(std::move((aOther).get_ResetOriginResponse()));
(aOther).MaybeDestroy();
break;
}
case TPersistedResponse:
{
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse(std::move((aOther).get_PersistedResponse()));
(aOther).MaybeDestroy();
break;
}
case TPersistResponse:
{
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse(std::move((aOther).get_PersistResponse()));
(aOther).MaybeDestroy();
break;
}
case TEstimateResponse:
{
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse(std::move((aOther).get_EstimateResponse()));
(aOther).MaybeDestroy();
break;
}
case TListOriginsResponse:
{
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse(std::move((aOther).get_ListOriginsResponse()));
(aOther).MaybeDestroy();
break;
}
case T__None:
{
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
return;
}
}
(aOther).mType = T__None;
mType = t;
}
RequestResponse::~RequestResponse()
{
MaybeDestroy();
}
auto RequestResponse::operator=(const nsresult& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
mType = Tnsresult;
return (*(this));
}
auto RequestResponse::operator=(nsresult&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
mType = Tnsresult;
return (*(this));
}
auto RequestResponse::operator=(const StorageNameResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse(aRhs);
mType = TStorageNameResponse;
return (*(this));
}
auto RequestResponse::operator=(StorageNameResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse(std::move(aRhs));
mType = TStorageNameResponse;
return (*(this));
}
auto RequestResponse::operator=(const InitializePersistentOriginResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse(aRhs);
mType = TInitializePersistentOriginResponse;
return (*(this));
}
auto RequestResponse::operator=(InitializePersistentOriginResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse(std::move(aRhs));
mType = TInitializePersistentOriginResponse;
return (*(this));
}
auto RequestResponse::operator=(const InitializeTemporaryOriginResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse(aRhs);
mType = TInitializeTemporaryOriginResponse;
return (*(this));
}
auto RequestResponse::operator=(InitializeTemporaryOriginResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse(std::move(aRhs));
mType = TInitializeTemporaryOriginResponse;
return (*(this));
}
auto RequestResponse::operator=(const GetFullOriginMetadataResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse(aRhs);
mType = TGetFullOriginMetadataResponse;
return (*(this));
}
auto RequestResponse::operator=(GetFullOriginMetadataResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse(std::move(aRhs));
mType = TGetFullOriginMetadataResponse;
return (*(this));
}
auto RequestResponse::operator=(const ResetOriginResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse(aRhs);
mType = TResetOriginResponse;
return (*(this));
}
auto RequestResponse::operator=(ResetOriginResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse(std::move(aRhs));
mType = TResetOriginResponse;
return (*(this));
}
auto RequestResponse::operator=(const PersistedResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse(aRhs);
mType = TPersistedResponse;
return (*(this));
}
auto RequestResponse::operator=(PersistedResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse(std::move(aRhs));
mType = TPersistedResponse;
return (*(this));
}
auto RequestResponse::operator=(const PersistResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse(aRhs);
mType = TPersistResponse;
return (*(this));
}
auto RequestResponse::operator=(PersistResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse(std::move(aRhs));
mType = TPersistResponse;
return (*(this));
}
auto RequestResponse::operator=(const EstimateResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse(aRhs);
mType = TEstimateResponse;
return (*(this));
}
auto RequestResponse::operator=(EstimateResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse(std::move(aRhs));
mType = TEstimateResponse;
return (*(this));
}
auto RequestResponse::operator=(const ListOriginsResponse& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse(aRhs);
mType = TListOriginsResponse;
return (*(this));
}
auto RequestResponse::operator=(ListOriginsResponse&& aRhs) -> RequestResponse&
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse(std::move(aRhs));
mType = TListOriginsResponse;
return (*(this));
}
auto RequestResponse::operator=(const RequestResponse& aRhs) -> RequestResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
break;
}
case TStorageNameResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse((aRhs).get_StorageNameResponse());
break;
}
case TInitializePersistentOriginResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse((aRhs).get_InitializePersistentOriginResponse());
break;
}
case TInitializeTemporaryOriginResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse((aRhs).get_InitializeTemporaryOriginResponse());
break;
}
case TGetFullOriginMetadataResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse((aRhs).get_GetFullOriginMetadataResponse());
break;
}
case TResetOriginResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse((aRhs).get_ResetOriginResponse());
break;
}
case TPersistedResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse((aRhs).get_PersistedResponse());
break;
}
case TPersistResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse((aRhs).get_PersistResponse());
break;
}
case TEstimateResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse((aRhs).get_EstimateResponse());
break;
}
case TListOriginsResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse((aRhs).get_ListOriginsResponse());
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
mType = t;
return (*(this));
}
auto RequestResponse::operator=(RequestResponse&& aRhs) -> RequestResponse&
{
(aRhs).AssertSanity();
Type t = (aRhs).type();
switch (t) {
case Tnsresult:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move((aRhs).get_nsresult()));
(aRhs).MaybeDestroy();
break;
}
case TStorageNameResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_StorageNameResponse()) StorageNameResponse(std::move((aRhs).get_StorageNameResponse()));
(aRhs).MaybeDestroy();
break;
}
case TInitializePersistentOriginResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializePersistentOriginResponse()) InitializePersistentOriginResponse(std::move((aRhs).get_InitializePersistentOriginResponse()));
(aRhs).MaybeDestroy();
break;
}
case TInitializeTemporaryOriginResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_InitializeTemporaryOriginResponse()) InitializeTemporaryOriginResponse(std::move((aRhs).get_InitializeTemporaryOriginResponse()));
(aRhs).MaybeDestroy();
break;
}
case TGetFullOriginMetadataResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_GetFullOriginMetadataResponse()) GetFullOriginMetadataResponse(std::move((aRhs).get_GetFullOriginMetadataResponse()));
(aRhs).MaybeDestroy();
break;
}
case TResetOriginResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ResetOriginResponse()) ResetOriginResponse(std::move((aRhs).get_ResetOriginResponse()));
(aRhs).MaybeDestroy();
break;
}
case TPersistedResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistedResponse()) PersistedResponse(std::move((aRhs).get_PersistedResponse()));
(aRhs).MaybeDestroy();
break;
}
case TPersistResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_PersistResponse()) PersistResponse(std::move((aRhs).get_PersistResponse()));
(aRhs).MaybeDestroy();
break;
}
case TEstimateResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_EstimateResponse()) EstimateResponse(std::move((aRhs).get_EstimateResponse()));
(aRhs).MaybeDestroy();
break;
}
case TListOriginsResponse:
{
MaybeDestroy();
new (mozilla::KnownNotNull, ptr_ListOriginsResponse()) ListOriginsResponse(std::move((aRhs).get_ListOriginsResponse()));
(aRhs).MaybeDestroy();
break;
}
case T__None:
{
MaybeDestroy();
break;
}
default:
{
mozilla::ipc::LogicError("unreached");
break;
}
}
(aRhs).mType = T__None;
mType = t;
return (*(this));
}
} // namespace quota
} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::quota::RequestResponse>::Write(
IPC::MessageWriter* aWriter,
const paramType& aVar) -> void
{
typedef ::mozilla::dom::quota::RequestResponse union__;
int type = (aVar).type();
IPC::WriteParam(aWriter, type);
// Sentinel = 'RequestResponse'
(aWriter)->WriteSentinel(822806073);
switch (type) {
case union__::Tnsresult:
{
IPC::WriteParam(aWriter, (aVar).get_nsresult());
// Sentinel = 'Tnsresult'
(aWriter)->WriteSentinel(313394133);
return;
}
case union__::TStorageNameResponse:
{
IPC::WriteParam(aWriter, (aVar).get_StorageNameResponse());
// Sentinel = 'TStorageNameResponse'
(aWriter)->WriteSentinel(1376651258);
return;
}
case union__::TInitializePersistentOriginResponse:
{
IPC::WriteParam(aWriter, (aVar).get_InitializePersistentOriginResponse());
// Sentinel = 'TInitializePersistentOriginResponse'
(aWriter)->WriteSentinel(4263579215);
return;
}
case union__::TInitializeTemporaryOriginResponse:
{
IPC::WriteParam(aWriter, (aVar).get_InitializeTemporaryOriginResponse());
// Sentinel = 'TInitializeTemporaryOriginResponse'
(aWriter)->WriteSentinel(4017753569);
return;
}
case union__::TGetFullOriginMetadataResponse:
{
IPC::WriteParam(aWriter, (aVar).get_GetFullOriginMetadataResponse());
// Sentinel = 'TGetFullOriginMetadataResponse'
(aWriter)->WriteSentinel(3013938144);
return;
}
case union__::TResetOriginResponse:
{
IPC::WriteParam(aWriter, (aVar).get_ResetOriginResponse());
// Sentinel = 'TResetOriginResponse'
(aWriter)->WriteSentinel(1384515599);
return;
}
case union__::TPersistedResponse:
{
IPC::WriteParam(aWriter, (aVar).get_PersistedResponse());
// Sentinel = 'TPersistedResponse'
(aWriter)->WriteSentinel(1145243479);
return;
}
case union__::TPersistResponse:
{
IPC::WriteParam(aWriter, (aVar).get_PersistResponse());
// Sentinel = 'TPersistResponse'
(aWriter)->WriteSentinel(911148686);
return;
}
case union__::TEstimateResponse:
{
IPC::WriteParam(aWriter, (aVar).get_EstimateResponse());
// Sentinel = 'TEstimateResponse'
(aWriter)->WriteSentinel(1010894560);
return;
}
case union__::TListOriginsResponse:
{
IPC::WriteParam(aWriter, (aVar).get_ListOriginsResponse());
// Sentinel = 'TListOriginsResponse'
(aWriter)->WriteSentinel(1391659035);
return;
}
default:
{
aWriter->FatalError("unknown variant of union RequestResponse");
return;
}
}
}
auto ParamTraits<::mozilla::dom::quota::RequestResponse>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
typedef ::mozilla::dom::quota::RequestResponse union__;
auto maybe__type = IPC::ReadParam<int>(aReader);
if (!maybe__type) {
aReader->FatalError("Error deserializing type of union RequestResponse");
return {};
}
auto& type = *maybe__type;
// Sentinel = 'RequestResponse'
if ((!((aReader)->ReadSentinel(822806073)))) {
mozilla::ipc::SentinelReadError("Error deserializing type of union RequestResponse");
return {};
}
switch (type) {
case union__::Tnsresult:
{
auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant Tnsresult of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'Tnsresult'
if ((!((aReader)->ReadSentinel(313394133)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TStorageNameResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::StorageNameResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TStorageNameResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TStorageNameResponse'
if ((!((aReader)->ReadSentinel(1376651258)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TStorageNameResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TInitializePersistentOriginResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::InitializePersistentOriginResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TInitializePersistentOriginResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TInitializePersistentOriginResponse'
if ((!((aReader)->ReadSentinel(4263579215)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TInitializePersistentOriginResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TInitializeTemporaryOriginResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::InitializeTemporaryOriginResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TInitializeTemporaryOriginResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TInitializeTemporaryOriginResponse'
if ((!((aReader)->ReadSentinel(4017753569)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TInitializeTemporaryOriginResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TGetFullOriginMetadataResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::GetFullOriginMetadataResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TGetFullOriginMetadataResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TGetFullOriginMetadataResponse'
if ((!((aReader)->ReadSentinel(3013938144)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TGetFullOriginMetadataResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TResetOriginResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::ResetOriginResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TResetOriginResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TResetOriginResponse'
if ((!((aReader)->ReadSentinel(1384515599)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TResetOriginResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TPersistedResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::PersistedResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TPersistedResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TPersistedResponse'
if ((!((aReader)->ReadSentinel(1145243479)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TPersistedResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TPersistResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::PersistResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TPersistResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TPersistResponse'
if ((!((aReader)->ReadSentinel(911148686)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TPersistResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TEstimateResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::EstimateResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TEstimateResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TEstimateResponse'
if ((!((aReader)->ReadSentinel(1010894560)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TEstimateResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
case union__::TListOriginsResponse:
{
auto maybe__tmp = IPC::ReadParam<::mozilla::dom::quota::ListOriginsResponse>(aReader);
if (!maybe__tmp) {
aReader->FatalError("Error deserializing variant TListOriginsResponse of union RequestResponse");
return {};
}
auto& tmp = *maybe__tmp;
// Sentinel = 'TListOriginsResponse'
if ((!((aReader)->ReadSentinel(1391659035)))) {
mozilla::ipc::SentinelReadError("Error deserializing variant TListOriginsResponse of union RequestResponse");
return {};
}
return std::move(tmp);
}
default:
{
aReader->FatalError("unknown variant of union RequestResponse");
return {};
}
}
}
} // namespace IPC