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


#include "mozilla/dom/PWindowGlobalChild.h"
#include "ipc/ErrorIPCUtils.h"
#include "mozilla/AntiTrackingIPCUtils.h"
#include "mozilla/GfxMessageUtils.h"
#include "mozilla/ProfilerLabels.h"
#include "mozilla/RemoteLazyInputStream.h"
#include "mozilla/TimeStamp.h"
#include "mozilla/URLClassifierIPCUtils.h"
#include "mozilla/dom/BindingIPCUtils.h"
#include "mozilla/dom/CSPMessageUtils.h"
#include "mozilla/dom/ClientIPCUtils.h"
#include "mozilla/dom/DocShellMessageUtils.h"
#include "mozilla/dom/DomSecurityIPCUtils.h"
#include "mozilla/dom/FeaturePolicyUtils.h"
#include "mozilla/dom/FetchIPCTypes.h"
#include "mozilla/dom/IdentityCredentialSerializationHelpers.h"
#include "mozilla/dom/NavigationAPIIPCUtils.h"
#include "mozilla/dom/PermissionMessageUtils.h"
#include "mozilla/dom/PolicyContainerMessageUtils.h"
#include "mozilla/dom/PropertyBagUtils.h"
#include "mozilla/dom/ReferrerInfoUtils.h"
#include "mozilla/dom/SessionHistoryEntry.h"
#include "mozilla/dom/SessionStoreMessageUtils.h"
#include "mozilla/dom/TabMessageUtils.h"
#include "mozilla/dom/WindowGlobalChild.h"
#include "mozilla/dom/ipc/StructuredCloneData.h"
#include "mozilla/dom/notification/IPCUtils.h"
#include "mozilla/ipc/BigBuffer.h"
#include "mozilla/ipc/IPCCore.h"
#include "mozilla/ipc/IPCStreamUtils.h"
#include "mozilla/ipc/SerializedStructuredCloneBuffer.h"
#include "mozilla/ipc/TransportSecurityInfoUtils.h"
#include "mozilla/ipc/URIUtils.h"
#include "mozilla/layers/LayersMessageUtils.h"
#include "mozilla/net/CacheInfoIPCTypes.h"
#include "mozilla/net/ClassOfService.h"
#include "mozilla/net/NeckoMessageUtils.h"
#include "nsDOMNavigationTiming.h"
#include "nsDocShellLoadState.h"
#include "nsHttp.h"
#include "nsHttpResponseHead.h"
#include "nsIPolicyContainer.h"
#include "nsIPrincipal.h"
#include "nsIPropertyBag2.h"
#include "nsIReferrerInfo.h"
#include "nsITransportSecurityInfo.h"
#include "nsIURI.h"
#include "nsIVariant.h"
#include "nsPoint.h"

#include "mozilla/dom/PBrowserChild.h"
#include "mozilla/dom/PInProcessChild.h"
#include "mozilla/dom/PBrowserBridgeChild.h"
#include "mozilla/dom/PWebAuthnTransactionChild.h"
#include "mozilla/dom/PWebIdentityChild.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 {


auto PWindowGlobalChild::Recv__delete__() -> mozilla::ipc::IPCResult
{
    return IPC_OK();
}

MOZ_IMPLICIT PWindowGlobalChild::PWindowGlobalChild() :
    mozilla::ipc::IRefCountedProtocol(kProtocolId, mozilla::ipc::ChildSide)
{
    MOZ_COUNT_CTOR(PWindowGlobalChild);
}

PWindowGlobalChild::~PWindowGlobalChild()
{
    MOZ_COUNT_DTOR(PWindowGlobalChild);
}

auto PWindowGlobalChild::ActorAlloc() -> void
{
    AddRef();
}

auto PWindowGlobalChild::ActorDealloc() -> void
{
    Release();
}

auto PWindowGlobalChild::ManagedPWebAuthnTransactionChild(nsTArray<PWebAuthnTransactionChild*>& aArr) const -> void
{
    mManagedPWebAuthnTransactionChild.ToArray(aArr);
}

auto PWindowGlobalChild::ManagedPWebAuthnTransactionChild() const -> const ManagedContainer<PWebAuthnTransactionChild>&
{
    return mManagedPWebAuthnTransactionChild;
}

auto PWindowGlobalChild::ManagedPWebIdentityChild(nsTArray<PWebIdentityChild*>& aArr) const -> void
{
    mManagedPWebIdentityChild.ToArray(aArr);
}

auto PWindowGlobalChild::ManagedPWebIdentityChild() const -> const ManagedContainer<PWebIdentityChild>&
{
    return mManagedPWebIdentityChild;
}

auto PWindowGlobalChild::ManagedProtocolIds() const -> mozilla::Span<mozilla::ipc::ProtocolId const>
{
    static constexpr ::mozilla::ipc::ProtocolId sIds[] = {
        PWebAuthnTransactionMsgStart,
        PWebIdentityMsgStart
    };
    return sIds;
}

auto PWindowGlobalChild::GetManagedActors(mozilla::ipc::ProtocolId aProtocol) -> UntypedManagedContainer*
{
    switch (aProtocol) {
    case PWebAuthnTransactionMsgStart:
        return (&(mManagedPWebAuthnTransactionChild));
    case PWebIdentityMsgStart:
        return (&(mManagedPWebIdentityChild));
    default:
        return nullptr;
    }
}

auto PWindowGlobalChild::RejectPendingResponses(ResponseRejectReason aReason) -> void
{
    mAsyncCallbacks.RejectPendingResponses(aReason);
}

auto PWindowGlobalChild::OpenPWebAuthnTransactionEndpoint(PWebAuthnTransactionChild* aActor) -> ManagedEndpoint<PWebAuthnTransactionParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PWebAuthnTransactionChild actor");
        return ManagedEndpoint<PWebAuthnTransactionParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebAuthnTransactionChild actor");
        return ManagedEndpoint<PWebAuthnTransactionParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PWebAuthnTransactionParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PWindowGlobalChild::BindPWebAuthnTransactionEndpoint(
        ManagedEndpoint<PWebAuthnTransactionChild> aEndpoint,
        PWebAuthnTransactionChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PWindowGlobalChild::OpenPWebIdentityEndpoint(PWebIdentityChild* aActor) -> ManagedEndpoint<PWebIdentityParent>
{
    if (!aActor) {
        NS_WARNING("Cannot bind null PWebIdentityChild actor");
        return ManagedEndpoint<PWebIdentityParent>();
    }

    if (!aActor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebIdentityChild actor");
        return ManagedEndpoint<PWebIdentityParent>();
    }

    // Mark our actor as awaiting the other side to be bound. This will
    // be cleared when a `MANAGED_ENDPOINT_{DROPPED,BOUND}` message is
    // received.
    aActor->mAwaitingManagedEndpointBind = true;
    return ManagedEndpoint<PWebIdentityParent>(mozilla::ipc::PrivateIPDLInterface(), aActor);
}

auto PWindowGlobalChild::BindPWebIdentityEndpoint(
        ManagedEndpoint<PWebIdentityChild> aEndpoint,
        PWebIdentityChild* aActor) -> bool
{
    return aEndpoint.Bind(mozilla::ipc::PrivateIPDLInterface(), aActor, this);
}

auto PWindowGlobalChild::SendRawMessage(
        const JSActorMessageMeta& aMetadata,
        const JSIPCValue& aData,
        const UniquePtr<ClonedMessageData>& aStack) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_RawMessage(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aMetadata);
    // Sentinel = 'aMetadata'
    ((&(writer__)))->WriteSentinel(288752515);
    IPC::WriteParam((&(writer__)), aData);
    // Sentinel = 'aData'
    ((&(writer__)))->WriteSentinel(90571228);
    IPC::WriteParam((&(writer__)), aStack);
    // Sentinel = 'aStack'
    ((&(writer__)))->WriteSentinel(135201368);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_RawMessage", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendLoadURI(
        const MaybeDiscardedBrowsingContext& aTargetBC,
        mozilla::NotNull<nsDocShellLoadState*> aLoadState,
        const bool& aSetNavigating) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_LoadURI(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTargetBC);
    // Sentinel = 'aTargetBC'
    ((&(writer__)))->WriteSentinel(287245134);
    IPC::WriteParam((&(writer__)), aLoadState);
    // Sentinel = 'aLoadState'
    ((&(writer__)))->WriteSentinel(349570019);
    IPC::WriteParam((&(writer__)), aSetNavigating);
    // Sentinel = 'aSetNavigating'
    ((&(writer__)))->WriteSentinel(686556566);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_LoadURI", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendInternalLoad(mozilla::NotNull<nsDocShellLoadState*> aLoadState) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_InternalLoad(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aLoadState);
    // Sentinel = 'aLoadState'
    ((&(writer__)))->WriteSentinel(349570019);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_InternalLoad", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentURI(mozilla::NotNull<nsIURI*> aUri) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentURI(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aUri);
    // Sentinel = 'aUri'
    ((&(writer__)))->WriteSentinel(64225682);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentURI", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentPrincipal(
        nsIPrincipal* aPrincipal,
        nsIPrincipal* aStoragePrincipal) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentPrincipal(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aPrincipal);
    // Sentinel = 'aPrincipal'
    ((&(writer__)))->WriteSentinel(364381188);
    IPC::WriteParam((&(writer__)), aStoragePrincipal);
    // Sentinel = 'aStoragePrincipal'
    ((&(writer__)))->WriteSentinel(1026098905);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentPrincipal", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentHasLoaded(const bool& aDocumentHasLoaded) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentHasLoaded(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aDocumentHasLoaded);
    // Sentinel = 'aDocumentHasLoaded'
    ((&(writer__)))->WriteSentinel(1117259526);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentHasLoaded", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentHasUserInteracted(const bool& aDocumentHasUserInteracted) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentHasUserInteracted(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aDocumentHasUserInteracted);
    // Sentinel = 'aDocumentHasUserInteracted'
    ((&(writer__)))->WriteSentinel(2324695647);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentHasUserInteracted", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateSandboxFlags(const uint32_t& aSandboxFlags) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateSandboxFlags(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aSandboxFlags);
    // Sentinel = 'aSandboxFlags'
    ((&(writer__)))->WriteSentinel(590611742);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateSandboxFlags", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentCspSettings(
        const bool& aBlockAllMixedContent,
        const bool& aUpgradeInsecureRequests) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentCspSettings(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aBlockAllMixedContent);
    // Sentinel = 'aBlockAllMixedContent'
    ((&(writer__)))->WriteSentinel(1473906744);
    IPC::WriteParam((&(writer__)), aUpgradeInsecureRequests);
    // Sentinel = 'aUpgradeInsecureRequests'
    ((&(writer__)))->WriteSentinel(2002848196);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentCspSettings", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateCookieJarSettings(const CookieJarSettingsArgs& cookieJarSettings) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateCookieJarSettings(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), cookieJarSettings);
    // Sentinel = 'cookieJarSettings'
    ((&(writer__)))->WriteSentinel(1031800553);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateCookieJarSettings", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentTitle(const nsAString& aTitle) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentTitle(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTitle);
    // Sentinel = 'aTitle'
    ((&(writer__)))->WriteSentinel(137167460);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentTitle", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateDocumentSecurityInfo(nsITransportSecurityInfo* aSecurityInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateDocumentSecurityInfo(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aSecurityInfo);
    // Sentinel = 'aSecurityInfo'
    ((&(writer__)))->WriteSentinel(610075974);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateDocumentSecurityInfo", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateHttpsOnlyStatus(const uint32_t& aHttpsOnlyStatus) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateHttpsOnlyStatus(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aHttpsOnlyStatus);
    // Sentinel = 'aHttpsOnlyStatus'
    ((&(writer__)))->WriteSentinel(920323739);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateHttpsOnlyStatus", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendSetIsInitialDocument(const bool& aIsInitialDocument) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_SetIsInitialDocument(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aIsInitialDocument);
    // Sentinel = 'aIsInitialDocument'
    ((&(writer__)))->WriteSentinel(1108150055);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_SetIsInitialDocument", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendShare(
        const IPCWebShareData& aData,
        mozilla::ipc::ResolveCallback<nsresult>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_Share(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aData);
    // Sentinel = 'aData'
    ((&(writer__)))->WriteSentinel(90571228);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_Share", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PWindowGlobal::Reply_Share__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__rv = IPC::ReadParam<nsresult>(aReader);
            if (!maybe__rv) {
                (aReader)->FatalError("Error deserializing 'nsresult'");
                return MsgValueError;

            }
            auto& rv = *maybe__rv;
            // Sentinel = 'rv'
            if ((!((aReader)->ReadSentinel(22806761)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsresult'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(rv));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PWindowGlobalChild::SendShare(const IPCWebShareData& aData) -> RefPtr<SharePromise>
{
    RefPtr<MozPromise<nsresult, ResponseRejectReason, true>::Private> promise__ = new MozPromise<nsresult, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendShare(std::move(aData), [promise__](nsresult&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PWindowGlobalChild::SendGetContentBlockingEvents(
        mozilla::ipc::ResolveCallback<uint32_t>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_GetContentBlockingEvents(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_GetContentBlockingEvents", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PWindowGlobal::Reply_GetContentBlockingEvents__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__events = IPC::ReadParam<uint32_t>(aReader);
            if (!maybe__events) {
                (aReader)->FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& events = *maybe__events;
            // Sentinel = 'events'
            if ((!((aReader)->ReadSentinel(149619350)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(events));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PWindowGlobalChild::SendGetContentBlockingEvents() -> RefPtr<GetContentBlockingEventsPromise>
{
    RefPtr<MozPromise<uint32_t, ResponseRejectReason, true>::Private> promise__ = new MozPromise<uint32_t, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetContentBlockingEvents([promise__](uint32_t&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PWindowGlobalChild::SendSetClientInfo(const IPCClientInfo& aClientInfo) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_SetClientInfo(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aClientInfo);
    // Sentinel = 'aClientInfo'
    ((&(writer__)))->WriteSentinel(422315085);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_SetClientInfo", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendCheckPermitUnload(
        const bool& aHasInProcessBlocker,
        const XPCOMPermitUnloadAction& aAction,
        mozilla::ipc::ResolveCallback<bool>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_CheckPermitUnload(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aHasInProcessBlocker);
    // Sentinel = 'aHasInProcessBlocker'
    ((&(writer__)))->WriteSentinel(1345652694);
    IPC::WriteParam((&(writer__)), aAction);
    // Sentinel = 'aAction'
    ((&(writer__)))->WriteSentinel(175768256);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_CheckPermitUnload", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PWindowGlobal::Reply_CheckPermitUnload__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__permitUnload = IPC::ReadParam<bool>(aReader);
            if (!maybe__permitUnload) {
                (aReader)->FatalError("Error deserializing 'bool'");
                return MsgValueError;

            }
            auto& permitUnload = *maybe__permitUnload;
            // Sentinel = 'permitUnload'
            if ((!((aReader)->ReadSentinel(547816693)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'bool'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(permitUnload));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PWindowGlobalChild::SendCheckPermitUnload(
        const bool& aHasInProcessBlocker,
        const XPCOMPermitUnloadAction& aAction) -> RefPtr<CheckPermitUnloadPromise>
{
    RefPtr<MozPromise<bool, ResponseRejectReason, true>::Private> promise__ = new MozPromise<bool, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendCheckPermitUnload(std::move(aHasInProcessBlocker), std::move(aAction), [promise__](bool&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PWindowGlobalChild::SendExpectPageUseCounters(const MaybeDiscardedWindowContext& aTop) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_ExpectPageUseCounters(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aTop);
    // Sentinel = 'aTop'
    ((&(writer__)))->WriteSentinel(64094613);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_ExpectPageUseCounters", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendAccumulatePageUseCounters(const UseCounters& aUseCounters) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_AccumulatePageUseCounters(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aUseCounters);
    // Sentinel = 'aUseCounters'
    ((&(writer__)))->WriteSentinel(514131170);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_AccumulatePageUseCounters", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendRequestRestoreTabContent() -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_RequestRestoreTabContent(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_RequestRestoreTabContent", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateBFCacheStatus(
        const uint32_t& aOnFlags,
        const uint32_t& aOffFlags) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateBFCacheStatus(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aOnFlags);
    // Sentinel = 'aOnFlags'
    ((&(writer__)))->WriteSentinel(222233356);
    IPC::WriteParam((&(writer__)), aOffFlags);
    // Sentinel = 'aOffFlags'
    ((&(writer__)))->WriteSentinel(277480298);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateBFCacheStatus", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendUpdateActivePeerConnectionStatus(const bool& aIsAdded) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_UpdateActivePeerConnectionStatus(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aIsAdded);
    // Sentinel = 'aIsAdded'
    ((&(writer__)))->WriteSentinel(217055984);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_UpdateActivePeerConnectionStatus", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendSetSingleChannelId(const mozilla::Maybe<uint64_t>& singleChannelId) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_SetSingleChannelId(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), singleChannelId);
    // Sentinel = 'singleChannelId'
    ((&(writer__)))->WriteSentinel(810812905);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_SetSingleChannelId", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendSetDocumentDomain(mozilla::NotNull<nsIURI*> aDomain) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_SetDocumentDomain(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aDomain);
    // Sentinel = 'aDomain'
    ((&(writer__)))->WriteSentinel(176685754);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_SetDocumentDomain", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendDestroy() -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_Destroy(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_Destroy", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendReloadWithHttpsOnlyException() -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_ReloadWithHttpsOnlyException(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_ReloadWithHttpsOnlyException", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendGetStorageAccessPermission(
        const bool& aIncludeIdentityCredential,
        mozilla::ipc::ResolveCallback<uint32_t>&& aResolve,
        mozilla::ipc::RejectCallback&& aReject) -> void
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_GetStorageAccessPermission(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), aIncludeIdentityCredential);
    // Sentinel = 'aIncludeIdentityCredential'
    ((&(writer__)))->WriteSentinel(2324892267);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_GetStorageAccessPermission", OTHER);

    IPC::Message::seqno_t seqno__ = 0;
    if (ChannelSend(std::move(msg__), (&(seqno__)))) {
        mAsyncCallbacks.AddCallback(seqno__, PWindowGlobal::Reply_GetStorageAccessPermission__ID, [resolve=std::move(aResolve)](IPC::MessageReader* aReader) mutable {
            auto maybe__permission_action = IPC::ReadParam<uint32_t>(aReader);
            if (!maybe__permission_action) {
                (aReader)->FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& permission_action = *maybe__permission_action;
            // Sentinel = 'permission_action'
            if ((!((aReader)->ReadSentinel(1085605671)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }


            aReader->EndRead();

            resolve(std::move(permission_action));
            return MsgProcessed;
        }, std::move(aReject));
    }
    else {
        aReject(::mozilla::ipc::ResponseRejectReason::SendError);
    }
    return;
}

auto PWindowGlobalChild::SendGetStorageAccessPermission(const bool& aIncludeIdentityCredential) -> RefPtr<GetStorageAccessPermissionPromise>
{
    RefPtr<MozPromise<uint32_t, ResponseRejectReason, true>::Private> promise__ = new MozPromise<uint32_t, ResponseRejectReason, true>::Private(__func__);
    promise__->UseDirectTaskDispatch(__func__);
    SendGetStorageAccessPermission(std::move(aIncludeIdentityCredential), [promise__](uint32_t&& aValue) {
        promise__->Resolve(std::move(aValue), __func__);
    }, [promise__](ResponseRejectReason&& aReason) {
        promise__->Reject(std::move(aReason), __func__);
    });
    return promise__;
}

auto PWindowGlobalChild::SendSetCookies(
        const nsACString& baseDomain,
        const OriginAttributes& attrs,
        nsIURI* host,
        const bool& fromHttp,
        const bool& isThirdParty,
        mozilla::Span<CookieStruct const> cookies) -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_SetCookies(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), baseDomain);
    // Sentinel = 'baseDomain'
    ((&(writer__)))->WriteSentinel(360449012);
    IPC::WriteParam((&(writer__)), attrs);
    // Sentinel = 'attrs'
    ((&(writer__)))->WriteSentinel(107807279);
    IPC::WriteParam((&(writer__)), host);
    // Sentinel = 'host'
    ((&(writer__)))->WriteSentinel(72024511);
    IPC::WriteParam((&(writer__)), fromHttp);
    // Sentinel = 'fromHttp'
    ((&(writer__)))->WriteSentinel(249889621);
    IPC::WriteParam((&(writer__)), isThirdParty);
    // Sentinel = 'isThirdParty'
    ((&(writer__)))->WriteSentinel(526517480);
    IPC::WriteParam((&(writer__)), cookies);
    // Sentinel = 'cookies'
    ((&(writer__)))->WriteSentinel(195363566);


    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_SetCookies", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendOnInitialStorageAccess() -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_OnInitialStorageAccess(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_OnInitialStorageAccess", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendRecordUserActivationForBTP() -> bool
{
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_RecordUserActivationForBTP(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};



    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_RecordUserActivationForBTP", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));
    return sendok__;
}

auto PWindowGlobalChild::SendPWebAuthnTransactionConstructor(PWebAuthnTransactionChild* actor) -> PWebAuthnTransactionChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PWebAuthnTransactionChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebAuthnTransactionChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_PWebAuthnTransactionConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_PWebAuthnTransactionConstructor", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PWebAuthnTransactionChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PWindowGlobalChild::SendPWebIdentityConstructor(PWebIdentityChild* actor) -> PWebIdentityChild*
{
    if (!actor) {
        NS_WARNING("Cannot bind null PWebIdentityChild actor");
        return nullptr;
    }

    if (!actor->SetManagerAndRegister(this)) {
        NS_WARNING("Failed to bind PWebIdentityChild actor");
        return nullptr;
    }


    // Build our constructor message.
    UniquePtr<IPC::Message> msg__ = PWindowGlobal::Msg_PWebIdentityConstructor(Id());
    IPC::MessageWriter writer__{
            (*(msg__)),
            this};

    IPC::WriteParam((&(writer__)), (actor)->Id());
    // Sentinel = 'actorid'
    ((&(writer__)))->WriteSentinel(193725159);


    // Notify the other side about the newly created actor. This can
    // fail if our manager has already been destroyed.
    //
    // NOTE: If the send call fails due to toplevel channel teardown,
    // the `IProtocol::ChannelSend` wrapper absorbs the error for us,
    // so we don't tear down actors unexpectedly.

    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
        mozilla::ipc::LogMessageForProtocol(
            "PWindowGlobalChild",
            this->ToplevelProtocol()->OtherPidMaybeInvalid(),
            "Sending ",
            msg__->type(),
            mozilla::ipc::MessageDirection::eSending);
    }
    AUTO_PROFILER_LABEL("PWindowGlobal::Msg_PWebIdentityConstructor", OTHER);

    bool sendok__ = ChannelSend(std::move(msg__));


    // Warn, destroy the actor, and return null if the message failed to
    // send. Otherwise, return the successfully created actor reference.
    if (!sendok__) {
        NS_WARNING("Error sending PWebIdentityChild constructor");
        actor->ActorDisconnected(FailedConstructor);

        return nullptr;
    }
    return actor;
}

auto PWindowGlobalChild::DeallocManagee(
        mozilla::ipc::ProtocolId aProtocolId,
        IProtocol* aListener) -> void
{
    switch (aProtocolId) {
    default:
        FatalError("unreached");
        return;
    }
}

auto PWindowGlobalChild::OnMessageReceived(const Message& msg__) -> PWindowGlobalChild::Result
{
    switch (msg__.type()) {
    case MANAGED_ENDPOINT_BOUND_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            return MsgProcessed;
        }
    case MANAGED_ENDPOINT_DROPPED_MESSAGE_TYPE:
        {
            if (!mAwaitingManagedEndpointBind) {
                NS_WARNING("Unexpected managed endpoint lifecycle message after actor bound!");
                return MsgNotAllowed;
            }
            mAwaitingManagedEndpointBind = false;
            this->ActorDisconnected(ManagedEndpointDropped);
            return MsgProcessed;
        }
    case PWindowGlobal::Msg___delete____ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg___delete__", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->Recv__delete__();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }


            this->ActorDisconnected(Deletion);

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_MakeFrameLocal__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_MakeFrameLocal", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aFrameContext = IPC::ReadParam<MaybeDiscardedBrowsingContext>((&(reader__)));
            if (!maybe__aFrameContext) {
                FatalError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;

            }
            auto& aFrameContext = *maybe__aFrameContext;
            // Sentinel = 'aFrameContext'
            if ((!(((&(reader__)))->ReadSentinel(585565490)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;
            }
            auto maybe__aSwitchId = IPC::ReadParam<uint64_t>((&(reader__)));
            if (!maybe__aSwitchId) {
                FatalError("Error deserializing 'uint64_t'");
                return MsgValueError;

            }
            auto& aSwitchId = *maybe__aSwitchId;
            // Sentinel = 'aSwitchId'
            if ((!(((&(reader__)))->ReadSentinel(297730945)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint64_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvMakeFrameLocal(std::move(aFrameContext), std::move(aSwitchId));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_MakeFrameRemote__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_MakeFrameRemote", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aFrameContext = IPC::ReadParam<MaybeDiscardedBrowsingContext>((&(reader__)));
            if (!maybe__aFrameContext) {
                FatalError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;

            }
            auto& aFrameContext = *maybe__aFrameContext;
            // Sentinel = 'aFrameContext'
            if ((!(((&(reader__)))->ReadSentinel(585565490)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;
            }
            auto maybe__aEndpoint = IPC::ReadParam<ManagedEndpoint<::mozilla::dom::PBrowserBridgeChild>>((&(reader__)));
            if (!maybe__aEndpoint) {
                FatalError("Error deserializing 'ManagedEndpoint<::mozilla::dom::PBrowserBridgeChild>'");
                return MsgValueError;

            }
            auto& aEndpoint = *maybe__aEndpoint;
            // Sentinel = 'aEndpoint'
            if ((!(((&(reader__)))->ReadSentinel(292225955)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'ManagedEndpoint<::mozilla::dom::PBrowserBridgeChild>'");
                return MsgValueError;
            }
            auto maybe__aTabId = IPC::ReadParam<TabId>((&(reader__)));
            if (!maybe__aTabId) {
                FatalError("Error deserializing 'TabId'");
                return MsgValueError;

            }
            auto& aTabId = *maybe__aTabId;
            // Sentinel = 'aTabId'
            if ((!(((&(reader__)))->ReadSentinel(126878246)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'TabId'");
                return MsgValueError;
            }
            auto maybe__aLayersId = IPC::ReadParam<LayersId>((&(reader__)));
            if (!maybe__aLayersId) {
                FatalError("Error deserializing 'LayersId'");
                return MsgValueError;

            }
            auto& aLayersId = *maybe__aLayersId;
            // Sentinel = 'aLayersId'
            if ((!(((&(reader__)))->ReadSentinel(291439487)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'LayersId'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PWindowGlobal::Reply_MakeFrameRemote(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            MakeFrameRemoteResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'success'
                    ((&(writer__)))->WriteSentinel(200082170);

                    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PWindowGlobalChild",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvMakeFrameRemote(std::move(aFrameContext), std::move(aEndpoint), std::move(aTabId), std::move(aLayersId), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_DrawSnapshot__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_DrawSnapshot", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aRect = IPC::ReadParam<mozilla::Maybe<IntRect>>((&(reader__)));
            if (!maybe__aRect) {
                FatalError("Error deserializing 'IntRect?'");
                return MsgValueError;

            }
            auto& aRect = *maybe__aRect;
            // Sentinel = 'aRect'
            if ((!(((&(reader__)))->ReadSentinel(94044656)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'IntRect?'");
                return MsgValueError;
            }
            auto maybe__aScale = IPC::ReadParam<float>((&(reader__)));
            if (!maybe__aScale) {
                FatalError("Error deserializing 'float'");
                return MsgValueError;

            }
            auto& aScale = *maybe__aScale;
            // Sentinel = 'aScale'
            if ((!(((&(reader__)))->ReadSentinel(131531338)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'float'");
                return MsgValueError;
            }
            auto maybe__aBackgroundColor = IPC::ReadParam<nscolor>((&(reader__)));
            if (!maybe__aBackgroundColor) {
                FatalError("Error deserializing 'nscolor'");
                return MsgValueError;

            }
            auto& aBackgroundColor = *maybe__aBackgroundColor;
            // Sentinel = 'aBackgroundColor'
            if ((!(((&(reader__)))->ReadSentinel(884999777)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nscolor'");
                return MsgValueError;
            }
            auto maybe__aFlags = IPC::ReadParam<uint32_t>((&(reader__)));
            if (!maybe__aFlags) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& aFlags = *maybe__aFlags;
            // Sentinel = 'aFlags'
            if ((!(((&(reader__)))->ReadSentinel(129892943)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PWindowGlobal::Reply_DrawSnapshot(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            DrawSnapshotResolver resolver = [resolver__ = std::move(resolver__)](PaintFragment&& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), std::move(aParam));
                    // Sentinel = 'retval'
                    ((&(writer__)))->WriteSentinel(151716495);

                    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PWindowGlobalChild",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvDrawSnapshot(std::move(aRect), std::move(aScale), std::move(aBackgroundColor), std::move(aFlags), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_DispatchSecurityPolicyViolation__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_DispatchSecurityPolicyViolation", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aViolationEventJSON = IPC::ReadParam<nsString>((&(reader__)));
            if (!maybe__aViolationEventJSON) {
                FatalError("Error deserializing 'nsString'");
                return MsgValueError;

            }
            auto& aViolationEventJSON = *maybe__aViolationEventJSON;
            // Sentinel = 'aViolationEventJSON'
            if ((!(((&(reader__)))->ReadSentinel(1266878291)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsString'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvDispatchSecurityPolicyViolation(std::move(aViolationEventJSON));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_SaveStorageAccessPermissionGranted__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_SaveStorageAccessPermissionGranted", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvSaveStorageAccessPermissionGranted();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_AddBlockedFrameNodeByClassifier__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_AddBlockedFrameNodeByClassifier", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aNode = IPC::ReadParam<MaybeDiscardedBrowsingContext>((&(reader__)));
            if (!maybe__aNode) {
                FatalError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;

            }
            auto& aNode = *maybe__aNode;
            // Sentinel = 'aNode'
            if ((!(((&(reader__)))->ReadSentinel(94110184)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvAddBlockedFrameNodeByClassifier(std::move(aNode));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_ResetScalingZoom__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_ResetScalingZoom", OTHER);

            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvResetScalingZoom();
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_RestoreDocShellState__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_RestoreDocShellState", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aState = IPC::ReadParam<DocShellRestoreState>((&(reader__)));
            if (!maybe__aState) {
                FatalError("Error deserializing 'DocShellRestoreState'");
                return MsgValueError;

            }
            auto& aState = *maybe__aState;
            // Sentinel = 'aState'
            if ((!(((&(reader__)))->ReadSentinel(137036387)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'DocShellRestoreState'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PWindowGlobal::Reply_RestoreDocShellState(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            RestoreDocShellStateResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'success'
                    ((&(writer__)))->WriteSentinel(200082170);

                    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PWindowGlobalChild",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvRestoreDocShellState(std::move(aState), std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_RestoreTabContent__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_RestoreTabContent", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aData = IPC::ReadParam<RefPtr<SessionStoreRestoreData>>((&(reader__)));
            if (!maybe__aData) {
                FatalError("Error deserializing 'SessionStoreRestoreData'");
                return MsgValueError;

            }
            auto& aData = *maybe__aData;
            // Sentinel = 'aData'
            if ((!(((&(reader__)))->ReadSentinel(90571228)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'SessionStoreRestoreData'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::ActorId id__ = Id();
            UniquePtr<IPC::Message> reply__(PWindowGlobal::Reply_RestoreTabContent(id__));
            reply__->set_seqno(msg__.seqno());

            RefPtr<mozilla::ipc::IPDLResolverInner> resolver__ =
                new mozilla::ipc::IPDLResolverInner(std::move(reply__), this);

            RestoreTabContentResolver resolver = [resolver__ = std::move(resolver__)](const bool& aParam) {
                resolver__->Resolve([&] (IPC::Message* reply__, IProtocol* self__) {
                    IPC::MessageWriter writer__(*reply__, self__);
                    IPC::WriteParam((&(writer__)), aParam);
                    // Sentinel = 'success'
                    ((&(writer__)))->WriteSentinel(200082170);

                    if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                        mozilla::ipc::LogMessageForProtocol(
                            "PWindowGlobalChild",
                            self__->ToplevelProtocol()->OtherPidMaybeInvalid(),
                            "Sending reply ",
                            reply__->type(),
                            mozilla::ipc::MessageDirection::eSending);
                    }

                });
            };
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvRestoreTabContent(aData, std::move(resolver));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_RawMessage__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_RawMessage", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aMetadata = IPC::ReadParam<JSActorMessageMeta>((&(reader__)));
            if (!maybe__aMetadata) {
                FatalError("Error deserializing 'JSActorMessageMeta'");
                return MsgValueError;

            }
            auto& aMetadata = *maybe__aMetadata;
            // Sentinel = 'aMetadata'
            if ((!(((&(reader__)))->ReadSentinel(288752515)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'JSActorMessageMeta'");
                return MsgValueError;
            }
            auto maybe__aData = IPC::ReadParam<JSIPCValue>((&(reader__)));
            if (!maybe__aData) {
                FatalError("Error deserializing 'JSIPCValue'");
                return MsgValueError;

            }
            auto& aData = *maybe__aData;
            // Sentinel = 'aData'
            if ((!(((&(reader__)))->ReadSentinel(90571228)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'JSIPCValue'");
                return MsgValueError;
            }
            auto maybe__aStack = IPC::ReadParam<UniquePtr<ClonedMessageData>>((&(reader__)));
            if (!maybe__aStack) {
                FatalError("Error deserializing 'UniquePtr<ClonedMessageData>'");
                return MsgValueError;

            }
            auto& aStack = *maybe__aStack;
            // Sentinel = 'aStack'
            if ((!(((&(reader__)))->ReadSentinel(135201368)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'UniquePtr<ClonedMessageData>'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvRawMessage(std::move(aMetadata), std::move(aData), std::move(aStack));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Reply_Share__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_Share", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PWindowGlobal::Reply_GetContentBlockingEvents__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_GetContentBlockingEvents", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PWindowGlobal::Reply_CheckPermitUnload__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_CheckPermitUnload", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PWindowGlobal::Reply_GetStorageAccessPermission__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }

            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_GetStorageAccessPermission", OTHER);


            return mAsyncCallbacks.GotReply(this, msg__);
        }
    case PWindowGlobal::Reply_PWebAuthnTransactionConstructor__ID:
        {
            return MsgProcessed;
        }
    case PWindowGlobal::Reply_PWebIdentityConstructor__ID:
        {
            return MsgProcessed;
        }
    case PWindowGlobal::Msg_NotifyPermissionChange__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_NotifyPermissionChange", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__type = IPC::ReadParam<nsCString>((&(reader__)));
            if (!maybe__type) {
                FatalError("Error deserializing 'nsCString'");
                return MsgValueError;

            }
            auto& type = *maybe__type;
            // Sentinel = 'type'
            if ((!(((&(reader__)))->ReadSentinel(75760067)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'nsCString'");
                return MsgValueError;
            }
            auto maybe__permission = IPC::ReadParam<uint32_t>((&(reader__)));
            if (!maybe__permission) {
                FatalError("Error deserializing 'uint32_t'");
                return MsgValueError;

            }
            auto& permission = *maybe__permission;
            // Sentinel = 'permission'
            if ((!(((&(reader__)))->ReadSentinel(394921034)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'uint32_t'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvNotifyPermissionChange(std::move(type), std::move(permission));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    case PWindowGlobal::Msg_ProcessCloseRequest__ID:
        {
            if (mozilla::ipc::LoggingEnabledFor("PWindowGlobal", mozilla::ipc::ChildSide)) {
                mozilla::ipc::LogMessageForProtocol(
                    "PWindowGlobalChild",
                    this->ToplevelProtocol()->OtherPidMaybeInvalid(),
                    "Received ",
                    (&(msg__))->type(),
                    mozilla::ipc::MessageDirection::eReceiving);
            }
            AUTO_PROFILER_LABEL("PWindowGlobal::Msg_ProcessCloseRequest", OTHER);

            IPC::MessageReader reader__{
                    msg__,
                    this};

            auto maybe__aFocused = IPC::ReadParam<MaybeDiscardedBrowsingContext>((&(reader__)));
            if (!maybe__aFocused) {
                FatalError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;

            }
            auto& aFocused = *maybe__aFocused;
            // Sentinel = 'aFocused'
            if ((!(((&(reader__)))->ReadSentinel(232653611)))) {
                mozilla::ipc::SentinelReadError("Error deserializing 'MaybeDiscardedBrowsingContext'");
                return MsgValueError;
            }
            reader__.EndRead();
            mozilla::ipc::IPCResult __ok = (static_cast<WindowGlobalChild*>(this))->RecvProcessCloseRequest(std::move(aFocused));
            if ((!(__ok))) {
                mozilla::ipc::ProtocolErrorBreakpoint("Handler returned error code!");
                // Error handled in mozilla::ipc::IPCResult
                return MsgProcessingError;
            }

            return MsgProcessed;
        }
    default:
        return MsgNotKnown;
    }
}

auto PWindowGlobalChild::OnMessageReceived(
        const Message& msg__,
        UniquePtr<Message>& reply__) -> PWindowGlobalChild::Result
{
    return MsgNotKnown;
}



} // namespace dom
} // namespace mozilla
namespace IPC {
auto ParamTraits<::mozilla::dom::PWindowGlobalChild*>::Write(
        IPC::MessageWriter* aWriter,
        const paramType& aVar) -> void
{
    IPC::WriteParam(aWriter, static_cast<mozilla::ipc::IProtocol*>(aVar));
    // Sentinel = 'PWindowGlobal'
    (aWriter)->WriteSentinel(588449050);
}

auto ParamTraits<::mozilla::dom::PWindowGlobalChild*>::Read(IPC::MessageReader* aReader) -> IPC::ReadResult<paramType>
{
    auto maybe__actor = IPC::ReadParam<mozilla::ipc::IProtocol*>(aReader);
    if (!maybe__actor) {
        aReader->FatalError("Error deserializing managed PWindowGlobal actor");
        return {};

    }
    auto& actor = *maybe__actor;
    // Sentinel = 'PWindowGlobal'
    if ((!((aReader)->ReadSentinel(588449050)))) {
        mozilla::ipc::SentinelReadError("Error deserializing managed PWindowGlobal actor");
        return {};
    }

    if (actor && actor->GetProtocolId() != PWindowGlobalMsgStart) {
        aReader->FatalError("Unexpected actor type (expected PWindowGlobal)");

        return {};
    }
    return static_cast<::mozilla::dom::PWindowGlobalChild*>(actor);
}

} // namespace IPC
