//
// Automatically generated by ipdlc.
// Edit at your own risk
//


#include "mozilla/dom/ClientIPCUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/WorkerIPCUtils.h"
#include "mozilla/dom/BindingIPCUtils.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/dom/WorkerIPCUtils.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/dom/ServiceWorkerIPCUtils.h"
#include "mozilla/dom/WorkerIPCUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/PolicyContainerMessageUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/NavigationAPIIPCUtils.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/URLClassifierIPCUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/FeaturePolicyUtils.h"
#include "mozilla/dom/NavigationAPIIPCUtils.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/RemoteWorkerTypes.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 ServiceWorkerData|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::ServiceWorkerData>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).descriptor());
    // Sentinel = 'descriptor'
    (aWriter)->WriteSentinel(384894016);
    IPC::WriteParam(aWriter, (aVar).registrationDescriptor());
    // Sentinel = 'registrationDescriptor'
    (aWriter)->WriteSentinel(1776093499);
    IPC::WriteParam(aWriter, (aVar).cacheName());
    // Sentinel = 'cacheName'
    (aWriter)->WriteSentinel(289670006);
    IPC::WriteParam(aWriter, (aVar).id());
    // Sentinel = 'id'
    (aWriter)->WriteSentinel(20447438);
    (aWriter)->WriteBytes((&((aVar).loadFlags())), 4);
    // Sentinel = 'loadFlags'
    (aWriter)->WriteSentinel(297665422);
}

auto ParamTraits<::mozilla::dom::ServiceWorkerData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___descriptor = IPC::ReadParam<::mozilla::dom::IPCServiceWorkerDescriptor>(aReader);
    if (!maybe___descriptor) {
        aReader->FatalError("Error deserializing 'descriptor' (IPCServiceWorkerDescriptor) member of 'ServiceWorkerData'");
        return {};

    }
    auto& _descriptor = *maybe___descriptor;
    // Sentinel = 'descriptor'
    if ((!((aReader)->ReadSentinel(384894016)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'descriptor' (IPCServiceWorkerDescriptor) member of 'ServiceWorkerData'");
        return {};
    }
    auto maybe___registrationDescriptor = IPC::ReadParam<::mozilla::dom::IPCServiceWorkerRegistrationDescriptor>(aReader);
    if (!maybe___registrationDescriptor) {
        aReader->FatalError("Error deserializing 'registrationDescriptor' (IPCServiceWorkerRegistrationDescriptor) member of 'ServiceWorkerData'");
        return {};

    }
    auto& _registrationDescriptor = *maybe___registrationDescriptor;
    // Sentinel = 'registrationDescriptor'
    if ((!((aReader)->ReadSentinel(1776093499)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'registrationDescriptor' (IPCServiceWorkerRegistrationDescriptor) member of 'ServiceWorkerData'");
        return {};
    }
    auto maybe___cacheName = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___cacheName) {
        aReader->FatalError("Error deserializing 'cacheName' (nsString) member of 'ServiceWorkerData'");
        return {};

    }
    auto& _cacheName = *maybe___cacheName;
    // Sentinel = 'cacheName'
    if ((!((aReader)->ReadSentinel(289670006)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'cacheName' (nsString) member of 'ServiceWorkerData'");
        return {};
    }
    auto maybe___id = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___id) {
        aReader->FatalError("Error deserializing 'id' (nsString) member of 'ServiceWorkerData'");
        return {};

    }
    auto& _id = *maybe___id;
    // Sentinel = 'id'
    if ((!((aReader)->ReadSentinel(20447438)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'id' (nsString) member of 'ServiceWorkerData'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_descriptor),
            std::move(_registrationDescriptor),
            std::move(_cacheName),
            ::uint32_t{0},
            std::move(_id)};
    if ((!((aReader)->ReadBytesInto((&((result__)->loadFlags())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'loadFlags'
    if ((!((aReader)->ReadSentinel(297665422)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union OptionalServiceWorkerData|
//
namespace mozilla {
namespace dom {
auto OptionalServiceWorkerData::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case Tvoid_t:
        {
            (ptr_void_t())->~void_t__tdef();
            break;
        }
    case TServiceWorkerData:
        {
            (ptr_ServiceWorkerData())->~ServiceWorkerData__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT OptionalServiceWorkerData::OptionalServiceWorkerData(const void_t& aOther)
{
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
    mType = Tvoid_t;
}

MOZ_IMPLICIT OptionalServiceWorkerData::OptionalServiceWorkerData(void_t&& aOther)
{
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther));
    mType = Tvoid_t;
}

MOZ_IMPLICIT OptionalServiceWorkerData::OptionalServiceWorkerData(const ServiceWorkerData& aOther)
{
    new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData(aOther);
    mType = TServiceWorkerData;
}

MOZ_IMPLICIT OptionalServiceWorkerData::OptionalServiceWorkerData(ServiceWorkerData&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData(std::move(aOther));
    mType = TServiceWorkerData;
}

MOZ_IMPLICIT OptionalServiceWorkerData::OptionalServiceWorkerData(const OptionalServiceWorkerData& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case Tvoid_t:
        {
            new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
            break;
        }
    case TServiceWorkerData:
        {
            new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData((aOther).get_ServiceWorkerData());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT OptionalServiceWorkerData::OptionalServiceWorkerData(OptionalServiceWorkerData&& aOther)
{
    (aOther).AssertSanity();
    Type t = (aOther).type();
    switch (t) {
    case Tvoid_t:
        {
            new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t()));
            (aOther).MaybeDestroy();
            break;
        }
    case TServiceWorkerData:
        {
            new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData(std::move((aOther).get_ServiceWorkerData()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

OptionalServiceWorkerData::~OptionalServiceWorkerData()
{
    MaybeDestroy();
}

auto OptionalServiceWorkerData::operator=(const void_t& aRhs) -> OptionalServiceWorkerData&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(aRhs);
    mType = Tvoid_t;
    return (*(this));
}

auto OptionalServiceWorkerData::operator=(void_t&& aRhs) -> OptionalServiceWorkerData&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aRhs));
    mType = Tvoid_t;
    return (*(this));
}

auto OptionalServiceWorkerData::operator=(const ServiceWorkerData& aRhs) -> OptionalServiceWorkerData&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData(aRhs);
    mType = TServiceWorkerData;
    return (*(this));
}

auto OptionalServiceWorkerData::operator=(ServiceWorkerData&& aRhs) -> OptionalServiceWorkerData&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData(std::move(aRhs));
    mType = TServiceWorkerData;
    return (*(this));
}

auto OptionalServiceWorkerData::operator=(const OptionalServiceWorkerData& aRhs) -> OptionalServiceWorkerData&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case Tvoid_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_void_t()) void_t((aRhs).get_void_t());
            break;
        }
    case TServiceWorkerData:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData((aRhs).get_ServiceWorkerData());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto OptionalServiceWorkerData::operator=(OptionalServiceWorkerData&& aRhs) -> OptionalServiceWorkerData&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case Tvoid_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aRhs).get_void_t()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TServiceWorkerData:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ServiceWorkerData()) ServiceWorkerData(std::move((aRhs).get_ServiceWorkerData()));
            (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::OptionalServiceWorkerData>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    typedef ::mozilla::dom::OptionalServiceWorkerData union__;
    int type = (aVar).type();
    IPC::WriteParam(aWriter, type);
    // Sentinel = 'OptionalServiceWorkerData'
    (aWriter)->WriteSentinel(2204305932);

    switch (type) {
    case union__::Tvoid_t:
        {
            IPC::WriteParam(aWriter, (aVar).get_void_t());
            // Sentinel = 'Tvoid_t'
            (aWriter)->WriteSentinel(189006554);
            return;
        }
    case union__::TServiceWorkerData:
        {
            IPC::WriteParam(aWriter, (aVar).get_ServiceWorkerData());
            // Sentinel = 'TServiceWorkerData'
            (aWriter)->WriteSentinel(1125975834);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union OptionalServiceWorkerData");
            return;
        }
    }
}

auto ParamTraits<::mozilla::dom::OptionalServiceWorkerData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    typedef ::mozilla::dom::OptionalServiceWorkerData union__;
    auto maybe__type = IPC::ReadParam<int>(aReader);
    if (!maybe__type) {
        aReader->FatalError("Error deserializing type of union OptionalServiceWorkerData");
        return {};

    }
    auto& type = *maybe__type;
    // Sentinel = 'OptionalServiceWorkerData'
    if ((!((aReader)->ReadSentinel(2204305932)))) {
        mozilla::ipc::SentinelReadError("Error deserializing type of union OptionalServiceWorkerData");
        return {};
    }

    switch (type) {
    case union__::Tvoid_t:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::void_t>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant Tvoid_t of union OptionalServiceWorkerData");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'Tvoid_t'
            if ((!((aReader)->ReadSentinel(189006554)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union OptionalServiceWorkerData");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TServiceWorkerData:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ServiceWorkerData>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TServiceWorkerData of union OptionalServiceWorkerData");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TServiceWorkerData'
            if ((!((aReader)->ReadSentinel(1125975834)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TServiceWorkerData of union OptionalServiceWorkerData");
                return {};
            }
            return std::move(tmp);
        }
    default:
        {
            aReader->FatalError("unknown variant of union OptionalServiceWorkerData");
            return {};
        }
    }
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct RemoteWorkerData|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::RemoteWorkerData>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).originalScriptURL());
    // Sentinel = 'originalScriptURL'
    (aWriter)->WriteSentinel(1052706494);
    IPC::WriteParam(aWriter, (aVar).baseScriptURL());
    // Sentinel = 'baseScriptURL'
    (aWriter)->WriteSentinel(603718916);
    IPC::WriteParam(aWriter, (aVar).resolvedScriptURL());
    // Sentinel = 'resolvedScriptURL'
    (aWriter)->WriteSentinel(1066075853);
    IPC::WriteParam(aWriter, (aVar).workerOptions());
    // Sentinel = 'workerOptions'
    (aWriter)->WriteSentinel(650773895);
    IPC::WriteParam(aWriter, (aVar).loadingPrincipalInfo());
    // Sentinel = 'loadingPrincipalInfo'
    (aWriter)->WriteSentinel(1425016845);
    IPC::WriteParam(aWriter, (aVar).principalInfo());
    // Sentinel = 'principalInfo'
    (aWriter)->WriteSentinel(633472335);
    IPC::WriteParam(aWriter, (aVar).partitionedPrincipalInfo());
    // Sentinel = 'partitionedPrincipalInfo'
    (aWriter)->WriteSentinel(2089290194);
    IPC::WriteParam(aWriter, (aVar).useRegularPrincipal());
    // Sentinel = 'useRegularPrincipal'
    (aWriter)->WriteSentinel(1304299458);
    IPC::WriteParam(aWriter, (aVar).usingStorageAccess());
    // Sentinel = 'usingStorageAccess'
    (aWriter)->WriteSentinel(1180698446);
    IPC::WriteParam(aWriter, (aVar).cookieJarSettings());
    // Sentinel = 'cookieJarSettings'
    (aWriter)->WriteSentinel(1031800553);
    IPC::WriteParam(aWriter, (aVar).domain());
    // Sentinel = 'domain'
    (aWriter)->WriteSentinel(144704121);
    IPC::WriteParam(aWriter, (aVar).isSecureContext());
    // Sentinel = 'isSecureContext'
    (aWriter)->WriteSentinel(812123689);
    IPC::WriteParam(aWriter, (aVar).clientInfo());
    // Sentinel = 'clientInfo'
    (aWriter)->WriteSentinel(373294092);
    IPC::WriteParam(aWriter, (aVar).referrerInfo());
    // Sentinel = 'referrerInfo'
    (aWriter)->WriteSentinel(540214506);
    IPC::WriteParam(aWriter, (aVar).storageAccess());
    // Sentinel = 'storageAccess'
    (aWriter)->WriteSentinel(628753736);
    IPC::WriteParam(aWriter, (aVar).isThirdPartyContext());
    // Sentinel = 'isThirdPartyContext'
    (aWriter)->WriteSentinel(1286735821);
    IPC::WriteParam(aWriter, (aVar).shouldResistFingerprinting());
    // Sentinel = 'shouldResistFingerprinting'
    (aWriter)->WriteSentinel(2441284304);
    IPC::WriteParam(aWriter, (aVar).overriddenFingerprintingSettings());
    // Sentinel = 'overriddenFingerprintingSettings'
    (aWriter)->WriteSentinel(3670740298);
    IPC::WriteParam(aWriter, (aVar).isOn3PCBExceptionList());
    // Sentinel = 'isOn3PCBExceptionList'
    (aWriter)->WriteSentinel(1400571885);
    IPC::WriteParam(aWriter, (aVar).originTrials());
    // Sentinel = 'originTrials'
    (aWriter)->WriteSentinel(544015608);
    IPC::WriteParam(aWriter, (aVar).serviceWorkerData());
    // Sentinel = 'serviceWorkerData'
    (aWriter)->WriteSentinel(1062471398);
    IPC::WriteParam(aWriter, (aVar).agentClusterId());
    // Sentinel = 'agentClusterId'
    (aWriter)->WriteSentinel(710477215);
    IPC::WriteParam(aWriter, (aVar).remoteType());
    // Sentinel = 'remoteType'
    (aWriter)->WriteSentinel(388826159);
}

auto ParamTraits<::mozilla::dom::RemoteWorkerData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___originalScriptURL = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___originalScriptURL) {
        aReader->FatalError("Error deserializing 'originalScriptURL' (nsString) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _originalScriptURL = *maybe___originalScriptURL;
    // Sentinel = 'originalScriptURL'
    if ((!((aReader)->ReadSentinel(1052706494)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'originalScriptURL' (nsString) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___baseScriptURL = IPC::ReadParam<::mozilla::ipc::URIParams>(aReader);
    if (!maybe___baseScriptURL) {
        aReader->FatalError("Error deserializing 'baseScriptURL' (URIParams) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _baseScriptURL = *maybe___baseScriptURL;
    // Sentinel = 'baseScriptURL'
    if ((!((aReader)->ReadSentinel(603718916)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'baseScriptURL' (URIParams) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___resolvedScriptURL = IPC::ReadParam<::mozilla::ipc::URIParams>(aReader);
    if (!maybe___resolvedScriptURL) {
        aReader->FatalError("Error deserializing 'resolvedScriptURL' (URIParams) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _resolvedScriptURL = *maybe___resolvedScriptURL;
    // Sentinel = 'resolvedScriptURL'
    if ((!((aReader)->ReadSentinel(1066075853)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'resolvedScriptURL' (URIParams) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___workerOptions = IPC::ReadParam<::mozilla::dom::WorkerOptions>(aReader);
    if (!maybe___workerOptions) {
        aReader->FatalError("Error deserializing 'workerOptions' (WorkerOptions) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _workerOptions = *maybe___workerOptions;
    // Sentinel = 'workerOptions'
    if ((!((aReader)->ReadSentinel(650773895)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'workerOptions' (WorkerOptions) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___loadingPrincipalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___loadingPrincipalInfo) {
        aReader->FatalError("Error deserializing 'loadingPrincipalInfo' (PrincipalInfo) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _loadingPrincipalInfo = *maybe___loadingPrincipalInfo;
    // Sentinel = 'loadingPrincipalInfo'
    if ((!((aReader)->ReadSentinel(1425016845)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'loadingPrincipalInfo' (PrincipalInfo) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___principalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___principalInfo) {
        aReader->FatalError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _principalInfo = *maybe___principalInfo;
    // Sentinel = 'principalInfo'
    if ((!((aReader)->ReadSentinel(633472335)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'principalInfo' (PrincipalInfo) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___partitionedPrincipalInfo = IPC::ReadParam<::mozilla::ipc::PrincipalInfo>(aReader);
    if (!maybe___partitionedPrincipalInfo) {
        aReader->FatalError("Error deserializing 'partitionedPrincipalInfo' (PrincipalInfo) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _partitionedPrincipalInfo = *maybe___partitionedPrincipalInfo;
    // Sentinel = 'partitionedPrincipalInfo'
    if ((!((aReader)->ReadSentinel(2089290194)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'partitionedPrincipalInfo' (PrincipalInfo) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___useRegularPrincipal = IPC::ReadParam<bool>(aReader);
    if (!maybe___useRegularPrincipal) {
        aReader->FatalError("Error deserializing 'useRegularPrincipal' (bool) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _useRegularPrincipal = *maybe___useRegularPrincipal;
    // Sentinel = 'useRegularPrincipal'
    if ((!((aReader)->ReadSentinel(1304299458)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'useRegularPrincipal' (bool) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___usingStorageAccess = IPC::ReadParam<bool>(aReader);
    if (!maybe___usingStorageAccess) {
        aReader->FatalError("Error deserializing 'usingStorageAccess' (bool) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _usingStorageAccess = *maybe___usingStorageAccess;
    // Sentinel = 'usingStorageAccess'
    if ((!((aReader)->ReadSentinel(1180698446)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'usingStorageAccess' (bool) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___cookieJarSettings = IPC::ReadParam<::mozilla::net::CookieJarSettingsArgs>(aReader);
    if (!maybe___cookieJarSettings) {
        aReader->FatalError("Error deserializing 'cookieJarSettings' (CookieJarSettingsArgs) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _cookieJarSettings = *maybe___cookieJarSettings;
    // Sentinel = 'cookieJarSettings'
    if ((!((aReader)->ReadSentinel(1031800553)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'cookieJarSettings' (CookieJarSettingsArgs) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___domain = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___domain) {
        aReader->FatalError("Error deserializing 'domain' (nsCString) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _domain = *maybe___domain;
    // Sentinel = 'domain'
    if ((!((aReader)->ReadSentinel(144704121)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'domain' (nsCString) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___isSecureContext = IPC::ReadParam<bool>(aReader);
    if (!maybe___isSecureContext) {
        aReader->FatalError("Error deserializing 'isSecureContext' (bool) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _isSecureContext = *maybe___isSecureContext;
    // Sentinel = 'isSecureContext'
    if ((!((aReader)->ReadSentinel(812123689)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isSecureContext' (bool) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___clientInfo = IPC::ReadParam<mozilla::Maybe<::mozilla::dom::IPCClientInfo>>(aReader);
    if (!maybe___clientInfo) {
        aReader->FatalError("Error deserializing 'clientInfo' (IPCClientInfo?) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _clientInfo = *maybe___clientInfo;
    // Sentinel = 'clientInfo'
    if ((!((aReader)->ReadSentinel(373294092)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'clientInfo' (IPCClientInfo?) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___referrerInfo = IPC::ReadParam<RefPtr<::nsIReferrerInfo>>(aReader);
    if (!maybe___referrerInfo) {
        aReader->FatalError("Error deserializing 'referrerInfo' (nsIReferrerInfo) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _referrerInfo = *maybe___referrerInfo;
    // Sentinel = 'referrerInfo'
    if ((!((aReader)->ReadSentinel(540214506)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'referrerInfo' (nsIReferrerInfo) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___storageAccess = IPC::ReadParam<::mozilla::StorageAccess>(aReader);
    if (!maybe___storageAccess) {
        aReader->FatalError("Error deserializing 'storageAccess' (StorageAccess) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _storageAccess = *maybe___storageAccess;
    // Sentinel = 'storageAccess'
    if ((!((aReader)->ReadSentinel(628753736)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'storageAccess' (StorageAccess) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___isThirdPartyContext = IPC::ReadParam<bool>(aReader);
    if (!maybe___isThirdPartyContext) {
        aReader->FatalError("Error deserializing 'isThirdPartyContext' (bool) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _isThirdPartyContext = *maybe___isThirdPartyContext;
    // Sentinel = 'isThirdPartyContext'
    if ((!((aReader)->ReadSentinel(1286735821)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isThirdPartyContext' (bool) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___shouldResistFingerprinting = IPC::ReadParam<bool>(aReader);
    if (!maybe___shouldResistFingerprinting) {
        aReader->FatalError("Error deserializing 'shouldResistFingerprinting' (bool) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _shouldResistFingerprinting = *maybe___shouldResistFingerprinting;
    // Sentinel = 'shouldResistFingerprinting'
    if ((!((aReader)->ReadSentinel(2441284304)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'shouldResistFingerprinting' (bool) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___overriddenFingerprintingSettings = IPC::ReadParam<mozilla::Maybe<::mozilla::RFPTargetSet>>(aReader);
    if (!maybe___overriddenFingerprintingSettings) {
        aReader->FatalError("Error deserializing 'overriddenFingerprintingSettings' (RFPTargetSet?) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _overriddenFingerprintingSettings = *maybe___overriddenFingerprintingSettings;
    // Sentinel = 'overriddenFingerprintingSettings'
    if ((!((aReader)->ReadSentinel(3670740298)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'overriddenFingerprintingSettings' (RFPTargetSet?) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___isOn3PCBExceptionList = IPC::ReadParam<bool>(aReader);
    if (!maybe___isOn3PCBExceptionList) {
        aReader->FatalError("Error deserializing 'isOn3PCBExceptionList' (bool) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _isOn3PCBExceptionList = *maybe___isOn3PCBExceptionList;
    // Sentinel = 'isOn3PCBExceptionList'
    if ((!((aReader)->ReadSentinel(1400571885)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isOn3PCBExceptionList' (bool) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___originTrials = IPC::ReadParam<::mozilla::OriginTrials>(aReader);
    if (!maybe___originTrials) {
        aReader->FatalError("Error deserializing 'originTrials' (OriginTrials) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _originTrials = *maybe___originTrials;
    // Sentinel = 'originTrials'
    if ((!((aReader)->ReadSentinel(544015608)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'originTrials' (OriginTrials) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___serviceWorkerData = IPC::ReadParam<::mozilla::dom::OptionalServiceWorkerData>(aReader);
    if (!maybe___serviceWorkerData) {
        aReader->FatalError("Error deserializing 'serviceWorkerData' (OptionalServiceWorkerData) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _serviceWorkerData = *maybe___serviceWorkerData;
    // Sentinel = 'serviceWorkerData'
    if ((!((aReader)->ReadSentinel(1062471398)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'serviceWorkerData' (OptionalServiceWorkerData) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___agentClusterId = IPC::ReadParam<::nsID>(aReader);
    if (!maybe___agentClusterId) {
        aReader->FatalError("Error deserializing 'agentClusterId' (nsID) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _agentClusterId = *maybe___agentClusterId;
    // Sentinel = 'agentClusterId'
    if ((!((aReader)->ReadSentinel(710477215)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'agentClusterId' (nsID) member of 'RemoteWorkerData'");
        return {};
    }
    auto maybe___remoteType = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___remoteType) {
        aReader->FatalError("Error deserializing 'remoteType' (nsCString) member of 'RemoteWorkerData'");
        return {};

    }
    auto& _remoteType = *maybe___remoteType;
    // Sentinel = 'remoteType'
    if ((!((aReader)->ReadSentinel(388826159)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'remoteType' (nsCString) member of 'RemoteWorkerData'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_originalScriptURL),
            std::move(_baseScriptURL),
            std::move(_resolvedScriptURL),
            std::move(_workerOptions),
            std::move(_loadingPrincipalInfo),
            std::move(_principalInfo),
            std::move(_partitionedPrincipalInfo),
            std::move(_useRegularPrincipal),
            std::move(_usingStorageAccess),
            std::move(_cookieJarSettings),
            std::move(_domain),
            std::move(_isSecureContext),
            std::move(_clientInfo),
            std::move(_referrerInfo),
            std::move(_storageAccess),
            std::move(_isThirdPartyContext),
            std::move(_shouldResistFingerprinting),
            std::move(_overriddenFingerprintingSettings),
            std::move(_isOn3PCBExceptionList),
            std::move(_originTrials),
            std::move(_serviceWorkerData),
            std::move(_agentClusterId),
            std::move(_remoteType)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ErrorDataNote|
//
namespace mozilla {
namespace dom {
auto ErrorDataNote::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(ErrorDataNote, columnNumber_) - offsetof(ErrorDataNote, lineNumber_)) == 4,
        "Bad assumptions about field layout!");
}

} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::ErrorDataNote>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).message());
    // Sentinel = 'message'
    (aWriter)->WriteSentinel(197198566);
    IPC::WriteParam(aWriter, (aVar).filename());
    // Sentinel = 'filename'
    (aWriter)->WriteSentinel(246547266);
    (aWriter)->WriteBytes((&((aVar).lineNumber())), 8);
    // Sentinel = 'lineNumber | columnNumber'
    (aWriter)->WriteSentinel(2114587077);
}

auto ParamTraits<::mozilla::dom::ErrorDataNote>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___message = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___message) {
        aReader->FatalError("Error deserializing 'message' (nsString) member of 'ErrorDataNote'");
        return {};

    }
    auto& _message = *maybe___message;
    // Sentinel = 'message'
    if ((!((aReader)->ReadSentinel(197198566)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'message' (nsString) member of 'ErrorDataNote'");
        return {};
    }
    auto maybe___filename = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___filename) {
        aReader->FatalError("Error deserializing 'filename' (nsCString) member of 'ErrorDataNote'");
        return {};

    }
    auto& _filename = *maybe___filename;
    // Sentinel = 'filename'
    if ((!((aReader)->ReadSentinel(246547266)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'filename' (nsCString) member of 'ErrorDataNote'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            ::uint32_t{0},
            ::uint32_t{0},
            std::move(_message),
            std::move(_filename)};
    if ((!((aReader)->ReadBytesInto((&((result__)->lineNumber())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'lineNumber | columnNumber'
    if ((!((aReader)->ReadSentinel(2114587077)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ErrorData|
//
namespace mozilla {
namespace dom {
auto ErrorData::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(ErrorData, columnNumber_) - offsetof(ErrorData, lineNumber_)) == 4,
        "Bad assumptions about field layout!");
}

} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::ErrorData>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).isWarning());
    // Sentinel = 'isWarning'
    (aWriter)->WriteSentinel(308872115);
    IPC::WriteParam(aWriter, (aVar).message());
    // Sentinel = 'message'
    (aWriter)->WriteSentinel(197198566);
    IPC::WriteParam(aWriter, (aVar).filename());
    // Sentinel = 'filename'
    (aWriter)->WriteSentinel(246547266);
    IPC::WriteParam(aWriter, (aVar).notes());
    // Sentinel = 'notes'
    (aWriter)->WriteSentinel(109052458);
    (aWriter)->WriteBytes((&((aVar).lineNumber())), 8);
    // Sentinel = 'lineNumber | columnNumber'
    (aWriter)->WriteSentinel(2114587077);
}

auto ParamTraits<::mozilla::dom::ErrorData>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___isWarning = IPC::ReadParam<bool>(aReader);
    if (!maybe___isWarning) {
        aReader->FatalError("Error deserializing 'isWarning' (bool) member of 'ErrorData'");
        return {};

    }
    auto& _isWarning = *maybe___isWarning;
    // Sentinel = 'isWarning'
    if ((!((aReader)->ReadSentinel(308872115)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isWarning' (bool) member of 'ErrorData'");
        return {};
    }
    auto maybe___message = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___message) {
        aReader->FatalError("Error deserializing 'message' (nsString) member of 'ErrorData'");
        return {};

    }
    auto& _message = *maybe___message;
    // Sentinel = 'message'
    if ((!((aReader)->ReadSentinel(197198566)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'message' (nsString) member of 'ErrorData'");
        return {};
    }
    auto maybe___filename = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___filename) {
        aReader->FatalError("Error deserializing 'filename' (nsCString) member of 'ErrorData'");
        return {};

    }
    auto& _filename = *maybe___filename;
    // Sentinel = 'filename'
    if ((!((aReader)->ReadSentinel(246547266)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'filename' (nsCString) member of 'ErrorData'");
        return {};
    }
    auto maybe___notes = IPC::ReadParam<nsTArray<::mozilla::dom::ErrorDataNote>>(aReader);
    if (!maybe___notes) {
        aReader->FatalError("Error deserializing 'notes' (ErrorDataNote[]) member of 'ErrorData'");
        return {};

    }
    auto& _notes = *maybe___notes;
    // Sentinel = 'notes'
    if ((!((aReader)->ReadSentinel(109052458)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'notes' (ErrorDataNote[]) member of 'ErrorData'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_isWarning),
            ::uint32_t{0},
            ::uint32_t{0},
            std::move(_message),
            std::move(_filename),
            std::move(_notes)};
    if ((!((aReader)->ReadBytesInto((&((result__)->lineNumber())), 8)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'lineNumber | columnNumber'
    if ((!((aReader)->ReadSentinel(2114587077)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct CSPViolation|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::CSPViolation>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).json());
    // Sentinel = 'json'
    (aWriter)->WriteSentinel(72417723);
}

auto ParamTraits<::mozilla::dom::CSPViolation>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___json = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___json) {
        aReader->FatalError("Error deserializing 'json' (nsString) member of 'CSPViolation'");
        return {};

    }
    auto& _json = *maybe___json;
    // Sentinel = 'json'
    if ((!((aReader)->ReadSentinel(72417723)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'json' (nsString) member of 'CSPViolation'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_json)};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct ErrorMismatchOptions|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::ErrorMismatchOptions>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
}

auto ParamTraits<::mozilla::dom::ErrorMismatchOptions>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    IPC::ReadResult<paramType> result__{std::in_place};
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |union ErrorValue|
//
namespace mozilla {
namespace dom {
auto ErrorValue::MaybeDestroy() -> void
{
    if ((mType) == (T__None)) {
        return;
    }
    switch (mType) {
    case Tnsresult:
        {
            (ptr_nsresult())->~nsresult__tdef();
            break;
        }
    case TErrorData:
        {
            (ptr_ErrorData())->~ErrorData__tdef();
            break;
        }
    case TCSPViolation:
        {
            (ptr_CSPViolation())->~CSPViolation__tdef();
            break;
        }
    case TErrorMismatchOptions:
        {
            (ptr_ErrorMismatchOptions())->~ErrorMismatchOptions__tdef();
            break;
        }
    case Tvoid_t:
        {
            (ptr_void_t())->~void_t__tdef();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("not reached");
            break;
        }
    }
}

MOZ_IMPLICIT ErrorValue::ErrorValue(const nsresult& aOther)
{
    new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aOther);
    mType = Tnsresult;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(nsresult&& aOther)
{
    new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aOther));
    mType = Tnsresult;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(const ErrorData& aOther)
{
    new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData(aOther);
    mType = TErrorData;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(ErrorData&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData(std::move(aOther));
    mType = TErrorData;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(const CSPViolation& aOther)
{
    new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation(aOther);
    mType = TCSPViolation;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(CSPViolation&& aOther)
{
    new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation(std::move(aOther));
    mType = TCSPViolation;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(const ErrorMismatchOptions& aOther)
{
    new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions(aOther);
    mType = TErrorMismatchOptions;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(ErrorMismatchOptions&& aOther)
{
    new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions(std::move(aOther));
    mType = TErrorMismatchOptions;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(const void_t& aOther)
{
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(aOther);
    mType = Tvoid_t;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(void_t&& aOther)
{
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aOther));
    mType = Tvoid_t;
}

MOZ_IMPLICIT ErrorValue::ErrorValue(const ErrorValue& aOther)
{
    (aOther).AssertSanity();
    switch ((aOther).type()) {
    case Tnsresult:
        {
            new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aOther).get_nsresult());
            break;
        }
    case TErrorData:
        {
            new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData((aOther).get_ErrorData());
            break;
        }
    case TCSPViolation:
        {
            new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation((aOther).get_CSPViolation());
            break;
        }
    case TErrorMismatchOptions:
        {
            new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions((aOther).get_ErrorMismatchOptions());
            break;
        }
    case Tvoid_t:
        {
            new (mozilla::KnownNotNull, ptr_void_t()) void_t((aOther).get_void_t());
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    mType = (aOther).type();
}

MOZ_IMPLICIT ErrorValue::ErrorValue(ErrorValue&& 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 TErrorData:
        {
            new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData(std::move((aOther).get_ErrorData()));
            (aOther).MaybeDestroy();
            break;
        }
    case TCSPViolation:
        {
            new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation(std::move((aOther).get_CSPViolation()));
            (aOther).MaybeDestroy();
            break;
        }
    case TErrorMismatchOptions:
        {
            new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions(std::move((aOther).get_ErrorMismatchOptions()));
            (aOther).MaybeDestroy();
            break;
        }
    case Tvoid_t:
        {
            new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aOther).get_void_t()));
            (aOther).MaybeDestroy();
            break;
        }
    case T__None:
        {
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            return;
        }
    }
    (aOther).mType = T__None;
    mType = t;
}

ErrorValue::~ErrorValue()
{
    MaybeDestroy();
}

auto ErrorValue::operator=(const nsresult& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(aRhs);
    mType = Tnsresult;
    return (*(this));
}

auto ErrorValue::operator=(nsresult&& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_nsresult()) nsresult(std::move(aRhs));
    mType = Tnsresult;
    return (*(this));
}

auto ErrorValue::operator=(const ErrorData& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData(aRhs);
    mType = TErrorData;
    return (*(this));
}

auto ErrorValue::operator=(ErrorData&& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData(std::move(aRhs));
    mType = TErrorData;
    return (*(this));
}

auto ErrorValue::operator=(const CSPViolation& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation(aRhs);
    mType = TCSPViolation;
    return (*(this));
}

auto ErrorValue::operator=(CSPViolation&& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation(std::move(aRhs));
    mType = TCSPViolation;
    return (*(this));
}

auto ErrorValue::operator=(const ErrorMismatchOptions& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions(aRhs);
    mType = TErrorMismatchOptions;
    return (*(this));
}

auto ErrorValue::operator=(ErrorMismatchOptions&& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions(std::move(aRhs));
    mType = TErrorMismatchOptions;
    return (*(this));
}

auto ErrorValue::operator=(const void_t& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(aRhs);
    mType = Tvoid_t;
    return (*(this));
}

auto ErrorValue::operator=(void_t&& aRhs) -> ErrorValue&
{
    MaybeDestroy();
    new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move(aRhs));
    mType = Tvoid_t;
    return (*(this));
}

auto ErrorValue::operator=(const ErrorValue& aRhs) -> ErrorValue&
{
    (aRhs).AssertSanity();
    Type t = (aRhs).type();
    switch (t) {
    case Tnsresult:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_nsresult()) nsresult((aRhs).get_nsresult());
            break;
        }
    case TErrorData:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData((aRhs).get_ErrorData());
            break;
        }
    case TCSPViolation:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation((aRhs).get_CSPViolation());
            break;
        }
    case TErrorMismatchOptions:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions((aRhs).get_ErrorMismatchOptions());
            break;
        }
    case Tvoid_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_void_t()) void_t((aRhs).get_void_t());
            break;
        }
    case T__None:
        {
            MaybeDestroy();
            break;
        }
    default:
        {
            mozilla::ipc::LogicError("unreached");
            break;
        }
    }
    mType = t;
    return (*(this));
}

auto ErrorValue::operator=(ErrorValue&& aRhs) -> ErrorValue&
{
    (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 TErrorData:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ErrorData()) ErrorData(std::move((aRhs).get_ErrorData()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TCSPViolation:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_CSPViolation()) CSPViolation(std::move((aRhs).get_CSPViolation()));
            (aRhs).MaybeDestroy();
            break;
        }
    case TErrorMismatchOptions:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_ErrorMismatchOptions()) ErrorMismatchOptions(std::move((aRhs).get_ErrorMismatchOptions()));
            (aRhs).MaybeDestroy();
            break;
        }
    case Tvoid_t:
        {
            MaybeDestroy();
            new (mozilla::KnownNotNull, ptr_void_t()) void_t(std::move((aRhs).get_void_t()));
            (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::ErrorValue>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    typedef ::mozilla::dom::ErrorValue union__;
    int type = (aVar).type();
    IPC::WriteParam(aWriter, type);
    // Sentinel = 'ErrorValue'
    (aWriter)->WriteSentinel(365429768);

    switch (type) {
    case union__::Tnsresult:
        {
            IPC::WriteParam(aWriter, (aVar).get_nsresult());
            // Sentinel = 'Tnsresult'
            (aWriter)->WriteSentinel(313394133);
            return;
        }
    case union__::TErrorData:
        {
            IPC::WriteParam(aWriter, (aVar).get_ErrorData());
            // Sentinel = 'TErrorData'
            (aWriter)->WriteSentinel(347931609);
            return;
        }
    case union__::TCSPViolation:
        {
            IPC::WriteParam(aWriter, (aVar).get_CSPViolation());
            // Sentinel = 'TCSPViolation'
            (aWriter)->WriteSentinel(541132016);
            return;
        }
    case union__::TErrorMismatchOptions:
        {
            IPC::WriteParam(aWriter, (aVar).get_ErrorMismatchOptions());
            // Sentinel = 'TErrorMismatchOptions'
            (aWriter)->WriteSentinel(1531250817);
            return;
        }
    case union__::Tvoid_t:
        {
            IPC::WriteParam(aWriter, (aVar).get_void_t());
            // Sentinel = 'Tvoid_t'
            (aWriter)->WriteSentinel(189006554);
            return;
        }
    default:
        {
            aWriter->FatalError("unknown variant of union ErrorValue");
            return;
        }
    }
}

auto ParamTraits<::mozilla::dom::ErrorValue>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    typedef ::mozilla::dom::ErrorValue union__;
    auto maybe__type = IPC::ReadParam<int>(aReader);
    if (!maybe__type) {
        aReader->FatalError("Error deserializing type of union ErrorValue");
        return {};

    }
    auto& type = *maybe__type;
    // Sentinel = 'ErrorValue'
    if ((!((aReader)->ReadSentinel(365429768)))) {
        mozilla::ipc::SentinelReadError("Error deserializing type of union ErrorValue");
        return {};
    }

    switch (type) {
    case union__::Tnsresult:
        {
            auto maybe__tmp = IPC::ReadParam<::nsresult>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant Tnsresult of union ErrorValue");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'Tnsresult'
            if ((!((aReader)->ReadSentinel(313394133)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant Tnsresult of union ErrorValue");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TErrorData:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ErrorData>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TErrorData of union ErrorValue");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TErrorData'
            if ((!((aReader)->ReadSentinel(347931609)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TErrorData of union ErrorValue");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TCSPViolation:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::CSPViolation>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TCSPViolation of union ErrorValue");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TCSPViolation'
            if ((!((aReader)->ReadSentinel(541132016)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TCSPViolation of union ErrorValue");
                return {};
            }
            return std::move(tmp);
        }
    case union__::TErrorMismatchOptions:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::dom::ErrorMismatchOptions>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant TErrorMismatchOptions of union ErrorValue");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'TErrorMismatchOptions'
            if ((!((aReader)->ReadSentinel(1531250817)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant TErrorMismatchOptions of union ErrorValue");
                return {};
            }
            return std::move(tmp);
        }
    case union__::Tvoid_t:
        {
            auto maybe__tmp = IPC::ReadParam<::mozilla::void_t>(aReader);
            if (!maybe__tmp) {
                aReader->FatalError("Error deserializing variant Tvoid_t of union ErrorValue");
                return {};

            }
            auto& tmp = *maybe__tmp;
            // Sentinel = 'Tvoid_t'
            if ((!((aReader)->ReadSentinel(189006554)))) {
                mozilla::ipc::SentinelReadError("Error deserializing variant Tvoid_t of union ErrorValue");
                return {};
            }
            return std::move(tmp);
        }
    default:
        {
            aReader->FatalError("unknown variant of union ErrorValue");
            return {};
        }
    }
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct RemoteWorkerDebuggerInfo|
//
namespace mozilla {
namespace dom {
auto RemoteWorkerDebuggerInfo::StaticAssertions() const -> void
{
    static_assert(
        (offsetof(RemoteWorkerDebuggerInfo, serviceWorkerID_) - offsetof(RemoteWorkerDebuggerInfo, windowID_)) == 8,
        "Bad assumptions about field layout!");
}

} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::RemoteWorkerDebuggerInfo>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).isChrome());
    // Sentinel = 'isChrome'
    (aWriter)->WriteSentinel(241369915);
    IPC::WriteParam(aWriter, (aVar).url());
    // Sentinel = 'url'
    (aWriter)->WriteSentinel(45220180);
    IPC::WriteParam(aWriter, (aVar).principal());
    // Sentinel = 'principal'
    (aWriter)->WriteSentinel(319620035);
    IPC::WriteParam(aWriter, (aVar).Id());
    // Sentinel = 'Id'
    (aWriter)->WriteSentinel(16253102);
    IPC::WriteParam(aWriter, (aVar).name());
    // Sentinel = 'name'
    (aWriter)->WriteSentinel(69075362);
    IPC::WriteParam(aWriter, (aVar).parentId());
    // Sentinel = 'parentId'
    (aWriter)->WriteSentinel(249430840);
    (aWriter)->WriteBytes((&((aVar).windowID())), 16);
    // Sentinel = 'windowID | serviceWorkerID'
    (aWriter)->WriteSentinel(2249001434);
    (aWriter)->WriteBytes((&((aVar).type())), 4);
    // Sentinel = 'type'
    (aWriter)->WriteSentinel(75760067);
}

auto ParamTraits<::mozilla::dom::RemoteWorkerDebuggerInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___isChrome = IPC::ReadParam<bool>(aReader);
    if (!maybe___isChrome) {
        aReader->FatalError("Error deserializing 'isChrome' (bool) member of 'RemoteWorkerDebuggerInfo'");
        return {};

    }
    auto& _isChrome = *maybe___isChrome;
    // Sentinel = 'isChrome'
    if ((!((aReader)->ReadSentinel(241369915)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'isChrome' (bool) member of 'RemoteWorkerDebuggerInfo'");
        return {};
    }
    auto maybe___url = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___url) {
        aReader->FatalError("Error deserializing 'url' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};

    }
    auto& _url = *maybe___url;
    // Sentinel = 'url'
    if ((!((aReader)->ReadSentinel(45220180)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'url' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};
    }
    auto maybe___principal = IPC::ReadParam<mozilla::NotNull<RefPtr<::nsIPrincipal>>>(aReader);
    if (!maybe___principal) {
        aReader->FatalError("Error deserializing 'principal' (NotNull<nsIPrincipal>) member of 'RemoteWorkerDebuggerInfo'");
        return {};

    }
    auto& _principal = *maybe___principal;
    // Sentinel = 'principal'
    if ((!((aReader)->ReadSentinel(319620035)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'principal' (NotNull<nsIPrincipal>) member of 'RemoteWorkerDebuggerInfo'");
        return {};
    }
    auto maybe___Id = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___Id) {
        aReader->FatalError("Error deserializing 'Id' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};

    }
    auto& _Id = *maybe___Id;
    // Sentinel = 'Id'
    if ((!((aReader)->ReadSentinel(16253102)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'Id' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};
    }
    auto maybe___name = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___name) {
        aReader->FatalError("Error deserializing 'name' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};

    }
    auto& _name = *maybe___name;
    // Sentinel = 'name'
    if ((!((aReader)->ReadSentinel(69075362)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'name' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};
    }
    auto maybe___parentId = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___parentId) {
        aReader->FatalError("Error deserializing 'parentId' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};

    }
    auto& _parentId = *maybe___parentId;
    // Sentinel = 'parentId'
    if ((!((aReader)->ReadSentinel(249430840)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'parentId' (nsString) member of 'RemoteWorkerDebuggerInfo'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_isChrome),
            ::uint32_t{0},
            std::move(_url),
            ::uint64_t{0},
            std::move(_principal),
            ::uint64_t{0},
            std::move(_Id),
            std::move(_name),
            std::move(_parentId)};
    if ((!((aReader)->ReadBytesInto((&((result__)->windowID())), 16)))) {
        aReader->FatalError("Error bulk reading fields from uint64_t");
        return {};
    }
    // Sentinel = 'windowID | serviceWorkerID'
    if ((!((aReader)->ReadSentinel(2249001434)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint64_t");
        return {};
    }
    if ((!((aReader)->ReadBytesInto((&((result__)->type())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'type'
    if ((!((aReader)->ReadSentinel(75760067)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC

//-----------------------------------------------------------------------------
// Method definitions for the IPDL type |struct RemoteWorkerDebuggerErrorInfo|
//
namespace mozilla {
namespace dom {
} // namespace dom
} // namespace mozilla

namespace IPC {
auto ParamTraits<::mozilla::dom::RemoteWorkerDebuggerErrorInfo>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, (aVar).fileName());
    // Sentinel = 'fileName'
    (aWriter)->WriteSentinel(238158626);
    IPC::WriteParam(aWriter, (aVar).message());
    // Sentinel = 'message'
    (aWriter)->WriteSentinel(197198566);
    (aWriter)->WriteBytes((&((aVar).lineNo())), 4);
    // Sentinel = 'lineNo'
    (aWriter)->WriteSentinel(143458918);
}

auto ParamTraits<::mozilla::dom::RemoteWorkerDebuggerErrorInfo>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe___fileName = IPC::ReadParam<::nsCString>(aReader);
    if (!maybe___fileName) {
        aReader->FatalError("Error deserializing 'fileName' (nsCString) member of 'RemoteWorkerDebuggerErrorInfo'");
        return {};

    }
    auto& _fileName = *maybe___fileName;
    // Sentinel = 'fileName'
    if ((!((aReader)->ReadSentinel(238158626)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'fileName' (nsCString) member of 'RemoteWorkerDebuggerErrorInfo'");
        return {};
    }
    auto maybe___message = IPC::ReadParam<::nsString>(aReader);
    if (!maybe___message) {
        aReader->FatalError("Error deserializing 'message' (nsString) member of 'RemoteWorkerDebuggerErrorInfo'");
        return {};

    }
    auto& _message = *maybe___message;
    // Sentinel = 'message'
    if ((!((aReader)->ReadSentinel(197198566)))) {
        mozilla::ipc::SentinelReadError("Error deserializing 'message' (nsString) member of 'RemoteWorkerDebuggerErrorInfo'");
        return {};
    }
    IPC::ReadResult<paramType> result__{
            std::in_place,
            std::move(_fileName),
            ::uint32_t{0},
            std::move(_message)};
    if ((!((aReader)->ReadBytesInto((&((result__)->lineNo())), 4)))) {
        aReader->FatalError("Error bulk reading fields from uint32_t");
        return {};
    }
    // Sentinel = 'lineNo'
    if ((!((aReader)->ReadSentinel(143458918)))) {
        mozilla::ipc::SentinelReadError("Error bulk reading fields from uint32_t");
        return {};
    }
    return result__;
}

} // namespace IPC
