зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1034911 - Make the destructor for KeyAlgorithm private. r=smaug
This commit is contained in:
Родитель
065ee9d2f2
Коммит
f905e21a03
|
@ -31,12 +31,6 @@ enum KeyAlgorithmStructuredCloneTags {
|
|||
|
||||
}
|
||||
|
||||
template<>
|
||||
struct HasDangerousPublicDestructor<dom::KeyAlgorithm>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
namespace dom {
|
||||
|
||||
class KeyAlgorithm : public nsISupports,
|
||||
|
@ -49,8 +43,6 @@ public:
|
|||
public:
|
||||
KeyAlgorithm(nsIGlobalObject* aGlobal, const nsString& aName);
|
||||
|
||||
virtual ~KeyAlgorithm();
|
||||
|
||||
nsIGlobalObject* GetParentObject() const
|
||||
{
|
||||
return mGlobal;
|
||||
|
@ -72,6 +64,8 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
virtual ~KeyAlgorithm();
|
||||
|
||||
nsRefPtr<nsIGlobalObject> mGlobal;
|
||||
nsString mName;
|
||||
CK_MECHANISM_TYPE mMechanism;
|
||||
|
|
|
@ -1167,8 +1167,8 @@ public:
|
|||
if (params.mLength.WasPassed()) {
|
||||
mLength = params.mLength.Value();
|
||||
} else {
|
||||
KeyAlgorithm hashAlg(global, hashName);
|
||||
switch (hashAlg.Mechanism()) {
|
||||
nsRefPtr<KeyAlgorithm> hashAlg = new KeyAlgorithm(global, hashName);
|
||||
switch (hashAlg->Mechanism()) {
|
||||
case CKM_SHA_1:
|
||||
case CKM_SHA256:
|
||||
mLength = 512;
|
||||
|
|
Загрузка…
Ссылка в новой задаче