Bug 1457501 - Part 2 - Remove unused type DeleteWithLock r?gsvelto
MozReview-Commit-ID: 9OU5YfRf45o
--- 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);