Bug 1329234 - Remove last uses of Scoped.h from PSM. r=mgoodwin
authorCykesiopka <cykesiopka.bmo@gmail.com>
Thu, 12 Jan 2017 00:56:38 +0800
changeset 329520 4a234901b459b858850a481b86d23da95d7dac90
parent 329519 67e09570f10aa8739f479466e8df6437eaf7cf8b
child 329521 94c2a93e9024f705bdd8be6bbb51228fb57a48c0
push id31213
push usercbook@mozilla.com
push dateMon, 16 Jan 2017 15:34:36 +0000
treeherdermozilla-central@aeda115ca5c3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmgoodwin
bugs1329234
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1329234 - Remove last uses of Scoped.h from PSM. r=mgoodwin Existing code has already switched to the UniqueX NSS types. MozReview-Commit-ID: EXtFq7q1V2j
security/manager/ssl/ScopedNSSTypes.h
--- a/security/manager/ssl/ScopedNSSTypes.h
+++ b/security/manager/ssl/ScopedNSSTypes.h
@@ -13,17 +13,16 @@
 #include <limits>
 #include <memory>
 
 #include "cert.h"
 #include "cms.h"
 #include "cryptohi.h"
 #include "keyhi.h"
 #include "mozilla/Likely.h"
-#include "mozilla/Scoped.h"
 #include "mozilla/UniquePtr.h"
 #include "nsDebug.h"
 #include "nsError.h"
 #include "NSSErrorsService.h"
 #include "pk11pub.h"
 #include "pkcs12.h"
 #include "prerror.h"
 #include "prio.h"
@@ -52,22 +51,16 @@ MapSECStatus(SECStatus rv)
 {
   if (rv == SECSuccess) {
     return NS_OK;
   }
 
   return mozilla::psm::GetXPCOMFromNSSError(PR_GetError());
 }
 
-// Alphabetical order by NSS type
-// Deprecated: use the equivalent UniquePtr templates instead.
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedCERTCertificate,
-                                          CERTCertificate,
-                                          CERT_DestroyCertificate)
-
 namespace internal {
 
 inline void
 PK11_DestroyContext_true(PK11Context * ctx) {
   PK11_DestroyContext(ctx, true);
 }
 
 } // namespace internal
@@ -171,23 +164,16 @@ private:
 
     return NS_OK;
   }
 
   uint8_t mItemBuf[HASH_LENGTH_MAX];
   SECItem mItem;
 };
 
-// Deprecated: use the equivalent UniquePtr templates instead.
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPK11SlotInfo,
-                                          PK11SlotInfo,
-                                          PK11_FreeSlot)
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedPK11SymKey,
-                                          PK11SymKey,
-                                          PK11_FreeSymKey)
 namespace internal {
 
 inline void
 PORT_FreeArena_false(PLArenaPool* arena)
 {
   // PL_FreeArenaPool can't be used because it doesn't actually free the
   // memory, which doesn't work well with memory analysis tools.
   return PORT_FreeArena(arena, false);
@@ -272,30 +258,16 @@ inline void SECKEYEncryptedPrivateKeyInf
 
 inline void VFY_DestroyContext_true(VFYContext * ctx)
 {
   VFY_DestroyContext(ctx, true);
 }
 
 } // namespace internal
 
-// Deprecated: use the equivalent UniquePtr templates instead.
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedSECItem,
-                                          SECItem,
-                                          internal::SECITEM_FreeItem_true)
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedSECKEYPrivateKey,
-                                          SECKEYPrivateKey,
-                                          SECKEY_DestroyPrivateKey)
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedSECKEYEncryptedPrivateKeyInfo,
-                                          SECKEYEncryptedPrivateKeyInfo,
-                                          internal::SECKEYEncryptedPrivateKeyInfo_true)
-MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE(ScopedSECKEYPublicKey,
-                                          SECKEYPublicKey,
-                                          SECKEY_DestroyPublicKey)
-
 MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniqueCERTCertificate,
                                       CERTCertificate,
                                       CERT_DestroyCertificate)
 MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniqueCERTCertificateList,
                                       CERTCertificateList,
                                       CERT_DestroyCertificateList)
 MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniqueCERTCertificatePolicies,
                                       CERTCertificatePolicies,