Index: Source/wtf/RefCountedLeakCounter.cpp |
diff --git a/Source/wtf/RefCountedLeakCounter.cpp b/Source/wtf/RefCountedLeakCounter.cpp |
index 8e389792b14734554d44c71a2fe3f19f35f19e2a..2e8ad1a46238c30c63d29e00888cb442bf68f81e 100644 |
--- a/Source/wtf/RefCountedLeakCounter.cpp |
+++ b/Source/wtf/RefCountedLeakCounter.cpp |
@@ -24,16 +24,12 @@ |
#if ENABLE(ASSERT) |
#include "wtf/Atomics.h" |
-#include "wtf/HashCountedSet.h" |
#endif |
namespace WTF { |
#if !ENABLE(ASSERT) |
-void RefCountedLeakCounter::suppressMessages(const char*) { } |
-void RefCountedLeakCounter::cancelMessageSuppression(const char*) { } |
- |
RefCountedLeakCounter::RefCountedLeakCounter(const char*) { } |
RefCountedLeakCounter::~RefCountedLeakCounter() { } |
@@ -45,23 +41,6 @@ void RefCountedLeakCounter::decrement() { } |
#define LOG_CHANNEL_PREFIX Log |
static WTFLogChannel LogRefCountedLeaks = { WTFLogChannelOn }; |
-typedef HashCountedSet<const char*, PtrHash<const char*>> ReasonSet; |
-static ReasonSet* leakMessageSuppressionReasons; |
- |
-void RefCountedLeakCounter::suppressMessages(const char* reason) |
-{ |
- if (!leakMessageSuppressionReasons) |
- leakMessageSuppressionReasons = new ReasonSet; |
- leakMessageSuppressionReasons->add(reason); |
-} |
- |
-void RefCountedLeakCounter::cancelMessageSuppression(const char* reason) |
-{ |
- ASSERT(leakMessageSuppressionReasons); |
- ASSERT(leakMessageSuppressionReasons->contains(reason)); |
- leakMessageSuppressionReasons->remove(reason); |
-} |
- |
RefCountedLeakCounter::RefCountedLeakCounter(const char* description) |
: m_description(description) |
{ |
@@ -69,16 +48,10 @@ RefCountedLeakCounter::RefCountedLeakCounter(const char* description) |
RefCountedLeakCounter::~RefCountedLeakCounter() |
{ |
- static bool loggedSuppressionReason; |
- if (m_count) { |
- if (!leakMessageSuppressionReasons || leakMessageSuppressionReasons->isEmpty()) |
- WTF_LOG(RefCountedLeaks, "LEAK: %u %s", m_count, m_description); |
- else if (!loggedSuppressionReason) { |
- // This logs only one reason. Later we could change it so we log all the reasons. |
- WTF_LOG(RefCountedLeaks, "No leak checking done: %s", leakMessageSuppressionReasons->begin()->key); |
- loggedSuppressionReason = true; |
- } |
- } |
+ if (!m_count) |
+ return; |
+ |
+ WTF_LOG(RefCountedLeaks, "LEAK: %u %s", m_count, m_description); |
} |
void RefCountedLeakCounter::increment() |