From e74c833af344dd6968c95f88196f9c01ecf5e52d Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 17 Feb 2019 10:35:48 +0100 Subject: [PATCH] AK: Fix broken instrumentation code for StringImpl. --- AK/StringImpl.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/AK/StringImpl.cpp b/AK/StringImpl.cpp index 579ef4db90..f36ffe8ce1 100644 --- a/AK/StringImpl.cpp +++ b/AK/StringImpl.cpp @@ -3,6 +3,8 @@ #include "kmalloc.h" #include "HashTable.h" +//#define DEBUG_STRINGIMPL + #ifdef DEBUG_STRINGIMPL unsigned g_stringimpl_count; static HashTable* g_all_live_stringimpls; @@ -33,6 +35,8 @@ StringImpl::StringImpl(ConstructWithInlineBufferTag, size_t length) , m_characters(m_inline_buffer) { #ifdef DEBUG_STRINGIMPL + if (!g_all_live_stringimpls) + g_all_live_stringimpls = new HashTable; ++g_stringimpl_count; g_all_live_stringimpls->set(this); #endif