Bug 1308132 - Use std::unique_ptr instead of mozilla::UniquePtr as the underlying type for ScopedNSSTypes.h UniqueX types. draft
authorCykesiopka <cykesiopka.bmo@gmail.com>
Thu, 06 Oct 2016 17:01:58 +0800
changeset 421483 c5da9f5f3040c301d3e2a075d1b72a9ae51f2079
parent 421436 ef948812fe08a374f90ee583bbea03e30b00a9dd
child 533106 57b7aee6ed6b651887856888ae98045da92c6819
push id31530
push usercykesiopka.bmo@gmail.com
push dateThu, 06 Oct 2016 09:02:42 +0000
bugs1308132
milestone52.0a1
Bug 1308132 - Use std::unique_ptr instead of mozilla::UniquePtr as the underlying type for ScopedNSSTypes.h UniqueX types. MozReview-Commit-ID: IAaBhPTjZft
security/manager/ssl/ScopedNSSTypes.h
--- a/security/manager/ssl/ScopedNSSTypes.h
+++ b/security/manager/ssl/ScopedNSSTypes.h
@@ -6,16 +6,17 @@
 
 // This header provides smart pointers and various helpers for code that needs
 // to interact with NSS.
 
 #ifndef ScopedNSSTypes_h
 #define ScopedNSSTypes_h
 
 #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"
@@ -96,17 +97,17 @@ MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLAT
                                           SGN_DestroyDigestInfo)
 
 // Emulates MOZ_TYPE_SPECIFIC_SCOPED_POINTER_TEMPLATE, but for UniquePtrs.
 #define MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(name, Type, Deleter) \
 struct name##DeletePolicy \
 { \
   void operator()(Type* aValue) { Deleter(aValue); } \
 }; \
-typedef UniquePtr<Type, name##DeletePolicy> name;
+typedef std::unique_ptr<Type, name##DeletePolicy> name;
 
 MOZ_TYPE_SPECIFIC_UNIQUE_PTR_TEMPLATE(UniquePK11Context,
                                       PK11Context,
                                       internal::PK11_DestroyContext_true)
 
 /** A more convenient way of dealing with digests calculated into
  *  stack-allocated buffers. NSS must be initialized on the main thread before
  *  use, and the caller must ensure NSS isn't shut down, typically by