Bug 1457501 - Part 2 - Remove unused type DeleteWithLock r?gsvelto draft
authorHaik Aftandilian <haftandilian@mozilla.com>
Thu, 26 Apr 2018 16:58:42 -0700
changeset 790020 0f57f707dbf328f035d297bff32d7648a10a3f30
parent 790019 6209668714f93ca64b3e068be660366c57c9c095
push id108390
push userhaftandilian@mozilla.com
push dateMon, 30 Apr 2018 23:54:57 +0000
reviewersgsvelto
bugs1457501
milestone61.0a1
Bug 1457501 - Part 2 - Remove unused type DeleteWithLock r?gsvelto MozReview-Commit-ID: 9OU5YfRf45o
toolkit/crashreporter/ThreadAnnotation.cpp
--- a/toolkit/crashreporter/ThreadAnnotation.cpp
+++ b/toolkit/crashreporter/ThreadAnnotation.cpp
@@ -194,31 +194,16 @@ private:
   nsCString mData;
 
   // This array tracks the created ThreadAnnotationSpan instances so that we
   // can make adjustments accordingly when we cut substrings from mData on
   // thread exit.
   nsTArray<ThreadAnnotationSpan*> mDataSpans;
 };
 
-template<typename T>
-class DeleteWithLock
-{
-public:
-  constexpr DeleteWithLock() {}
-
-  void operator()(T* aPtr) const
-  {
-    static_assert(sizeof(T) > 0, "T must be complete");
-    CrashReporterAutoLock lock(sMutex);
-
-    delete aPtr;
-  }
-};
-
 static bool sInitialized = false;
 static UniquePtr<ThreadAnnotationData> sThreadAnnotations;
 
 static unsigned sTLSThreadInfoKey = (unsigned) -1;
 void ThreadLocalDestructor(void* aUserData)
 {
   MOZ_ASSERT(aUserData);