зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1323339 - Cleanup of WebAuthn DOM classes; r=jcj r=baku
Changes WebAuthn DOM classes to take nsPIDOMInnerWindow* as parent pointer, instead of WebAuthentication* pointer. MozReview-Commit-ID: aK3k9Cc7hv
This commit is contained in:
Родитель
2945d52cd5
Коммит
8ad053f05d
|
@ -19,7 +19,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ScopedCredential)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
ScopedCredential::ScopedCredential(WebAuthentication* aParent)
|
||||
ScopedCredential::ScopedCredential(nsPIDOMWindowInner* aParent)
|
||||
: mParent(aParent)
|
||||
, mType(ScopedCredentialType::ScopedCred)
|
||||
{}
|
||||
|
|
|
@ -27,13 +27,13 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ScopedCredential)
|
||||
|
||||
public:
|
||||
explicit ScopedCredential(WebAuthentication* aParent);
|
||||
explicit ScopedCredential(nsPIDOMWindowInner* aParent);
|
||||
|
||||
protected:
|
||||
~ScopedCredential();
|
||||
|
||||
public:
|
||||
WebAuthentication*
|
||||
nsISupports*
|
||||
GetParentObject() const
|
||||
{
|
||||
return mParent;
|
||||
|
@ -55,7 +55,7 @@ public:
|
|||
SetId(CryptoBuffer& aBuffer);
|
||||
|
||||
private:
|
||||
RefPtr<WebAuthentication> mParent;
|
||||
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
||||
CryptoBuffer mIdBuffer;
|
||||
ScopedCredentialType mType;
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(ScopedCredentialInfo)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
ScopedCredentialInfo::ScopedCredentialInfo(WebAuthentication* aParent)
|
||||
ScopedCredentialInfo::ScopedCredentialInfo(nsPIDOMWindowInner* aParent)
|
||||
: mParent(aParent)
|
||||
{}
|
||||
|
||||
|
@ -59,6 +59,5 @@ ScopedCredentialInfo::SetAttestation(RefPtr<WebAuthnAttestation> aAttestation)
|
|||
mAttestation = aAttestation;
|
||||
}
|
||||
|
||||
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -35,13 +35,13 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(ScopedCredentialInfo)
|
||||
|
||||
public:
|
||||
explicit ScopedCredentialInfo(WebAuthentication* aParent);
|
||||
explicit ScopedCredentialInfo(nsPIDOMWindowInner* aParent);
|
||||
|
||||
protected:
|
||||
~ScopedCredentialInfo();
|
||||
|
||||
public:
|
||||
WebAuthentication*
|
||||
nsISupports*
|
||||
GetParentObject() const
|
||||
{
|
||||
return mParent;
|
||||
|
@ -63,7 +63,7 @@ public:
|
|||
SetAttestation(RefPtr<WebAuthnAttestation>);
|
||||
|
||||
private:
|
||||
RefPtr<WebAuthentication> mParent;
|
||||
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
||||
RefPtr<WebAuthnAttestation> mAttestation;
|
||||
RefPtr<ScopedCredential> mCredential;
|
||||
};
|
||||
|
|
|
@ -19,7 +19,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebAuthnAssertion)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
WebAuthnAssertion::WebAuthnAssertion(WebAuthentication* aParent)
|
||||
WebAuthnAssertion::WebAuthnAssertion(nsPIDOMWindowInner* aParent)
|
||||
: mParent(aParent)
|
||||
{}
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebAuthnAssertion)
|
||||
|
||||
public:
|
||||
explicit WebAuthnAssertion(WebAuthentication* aParent);
|
||||
explicit WebAuthnAssertion(nsPIDOMWindowInner* aParent);
|
||||
|
||||
protected:
|
||||
~WebAuthnAssertion();
|
||||
|
||||
public:
|
||||
WebAuthentication*
|
||||
nsPIDOMWindowInner*
|
||||
GetParentObject() const
|
||||
{
|
||||
return mParent;
|
||||
|
@ -73,7 +73,7 @@ public:
|
|||
SetSignature(CryptoBuffer& aBuffer);
|
||||
|
||||
private:
|
||||
RefPtr<WebAuthentication> mParent;
|
||||
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
||||
RefPtr<ScopedCredential> mCredential;
|
||||
CryptoBuffer mAuthenticatorData;
|
||||
CryptoBuffer mClientData;
|
||||
|
|
|
@ -19,7 +19,7 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(WebAuthnAttestation)
|
|||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||
NS_INTERFACE_MAP_END
|
||||
|
||||
WebAuthnAttestation::WebAuthnAttestation(WebAuthentication* aParent)
|
||||
WebAuthnAttestation::WebAuthnAttestation(nsPIDOMWindowInner* aParent)
|
||||
: mParent(aParent)
|
||||
{}
|
||||
|
||||
|
@ -57,8 +57,6 @@ void
|
|||
WebAuthnAttestation::GetAttestation(JSContext* aCx,
|
||||
JS::MutableHandle<JS::Value> aRetVal) const
|
||||
{
|
||||
// JS::RootedObject obj(aCx);
|
||||
// obj.set();
|
||||
aRetVal.setObject(*mAttestation.ToUint8Array(aCx));
|
||||
}
|
||||
|
||||
|
|
|
@ -26,13 +26,13 @@ public:
|
|||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(WebAuthnAttestation)
|
||||
|
||||
public:
|
||||
explicit WebAuthnAttestation(WebAuthentication* aParent);
|
||||
explicit WebAuthnAttestation(nsPIDOMWindowInner* aParent);
|
||||
|
||||
protected:
|
||||
~WebAuthnAttestation();
|
||||
|
||||
public:
|
||||
WebAuthentication*
|
||||
nsISupports*
|
||||
GetParentObject() const
|
||||
{
|
||||
return mParent;
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
SetAttestation(CryptoBuffer& aBuffer);
|
||||
|
||||
private:
|
||||
RefPtr<WebAuthentication> mParent;
|
||||
nsCOMPtr<nsPIDOMWindowInner> mParent;
|
||||
nsString mFormat;
|
||||
CryptoBuffer mClientData;
|
||||
CryptoBuffer mAuthenticatorData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче