diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:34:42 +0000 |
commit | da4c7e7ed675c3bf405668739c3012d140856109 (patch) | |
tree | cdd868dba063fecba609a1d819de271f0d51b23e /dom/webauthn/WebAuthnService.h | |
parent | Adding upstream version 125.0.3. (diff) | |
download | firefox-da4c7e7ed675c3bf405668739c3012d140856109.tar.xz firefox-da4c7e7ed675c3bf405668739c3012d140856109.zip |
Adding upstream version 126.0.upstream/126.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webauthn/WebAuthnService.h')
-rw-r--r-- | dom/webauthn/WebAuthnService.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/dom/webauthn/WebAuthnService.h b/dom/webauthn/WebAuthnService.h index 254b75d251..a3f4dab797 100644 --- a/dom/webauthn/WebAuthnService.h +++ b/dom/webauthn/WebAuthnService.h @@ -7,6 +7,7 @@ #include "nsIWebAuthnService.h" #include "AuthrsBridge_ffi.h" +#include "mozilla/dom/WebAuthnPromiseHolder.h" #ifdef MOZ_WIDGET_ANDROID # include "AndroidWebAuthnService.h" @@ -55,6 +56,21 @@ class WebAuthnService final : public nsIWebAuthnService { private: ~WebAuthnService() = default; + struct TransactionState { + nsCOMPtr<nsIWebAuthnService> service; + uint64_t transactionId; + Maybe<nsCOMPtr<nsIWebAuthnRegisterPromise>> parentRegisterPromise; + Maybe<nsCOMPtr<nsIWebAuthnRegisterResult>> registerResult; + MozPromiseRequestHolder<WebAuthnRegisterPromise> childRegisterRequest; + }; + using TransactionStateMutex = DataMutex<Maybe<TransactionState>>; + TransactionStateMutex mTransactionState; + + void ShowAttestationConsentPrompt(const nsString& aOrigin, + uint64_t aTransactionId, + uint64_t aBrowsingContextId); + void ResetLocked(const TransactionStateMutex::AutoLock& aGuard); + nsIWebAuthnService* DefaultService() { if (StaticPrefs::security_webauth_webauthn_enable_softtoken()) { return mAuthrsService; @@ -72,12 +88,6 @@ class WebAuthnService final : public nsIWebAuthnService { return DefaultService(); } - struct TransactionState { - nsCOMPtr<nsIWebAuthnService> service; - }; - using TransactionStateMutex = DataMutex<Maybe<TransactionState>>; - TransactionStateMutex mTransactionState; - nsCOMPtr<nsIWebAuthnService> mAuthrsService; nsCOMPtr<nsIWebAuthnService> mPlatformService; }; |