Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1514)

Unified Diff: Source/wtf/InstanceCounter.h

Issue 1317563005: Fix binary size increase because of class name loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix build. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/wtf/InstanceCounter.h
diff --git a/Source/wtf/InstanceCounter.h b/Source/wtf/InstanceCounter.h
index 602de6559fdf87fa0c76a4b9b4f6b43bd5e9e49c..c0a5961f6e61a83c2aff0e746b01211e97eba54b 100644
--- a/Source/wtf/InstanceCounter.h
+++ b/Source/wtf/InstanceCounter.h
@@ -34,10 +34,10 @@ namespace WTF {
class String;
WTF_EXPORT String dumpRefCountedInstanceCounts();
-// Warning: Using extractTypeNameFromFunctionName bloats binary size.
-// This function should be only used for debug and profiling purposes,
-// and should be never enabled on release builds.
-// TODO(kouhei): Move this inside #if when all dependencies are removed.
+#if ENABLE(INSTANCE_COUNTER) || ENABLE(GC_PROFILING)
+WTF_EXPORT void incrementInstanceCount(const char* extractNameFunctionName, void* ptr);
+WTF_EXPORT void decrementInstanceCount(const char* extractNameFunctionName, void* ptr);
+
WTF_EXPORT String extractTypeNameFromFunctionName(const char* funcName);
template<typename T>
@@ -46,9 +46,6 @@ inline const char* extractNameFunction()
return WTF_PRETTY_FUNCTION;
}
-#if ENABLE(INSTANCE_COUNTER) || ENABLE(GC_PROFILING)
-WTF_EXPORT void incrementInstanceCount(const char* extractNameFunctionName, void* ptr);
-WTF_EXPORT void decrementInstanceCount(const char* extractNameFunctionName, void* ptr);
template<typename T>
inline void incrementInstanceCount(T* p)

Powered by Google App Engine
This is Rietveld 408576698