summaryrefslogtreecommitdiff
path: root/src/3rdparty/javascriptcore
diff options
context:
space:
mode:
authorKent Hansen <kent.hansen@nokia.com>2012-08-10 12:28:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-13 09:32:42 +0200
commitd1cf1cc364463c196dfc99f04328755a67476569 (patch)
tree9e06c81279dd5c0d5f3e91952275f139194c40dc /src/3rdparty/javascriptcore
parent87857bd080668e7c249f9da1c9f1e24d030d6f1a (diff)
downloadqtscript-d1cf1cc364463c196dfc99f04328755a67476569.tar.gz
Suppress JavaScriptCore 'LEAK' messages at application exit
In debug mode, if a QScriptEngine was never destroyed, JavaScriptCore would output a message like LEAK: 120 Structure on stderr at exit. This is not terribly helpful to users; also, it's not common for Qt classes to produce such output. Since JavaScriptCore's only usage of the logging facility is for reporting these "leaks", we can disable logging altogether. Task-number: QTBUG-18201 Change-Id: Id598bd1f48129d821a954cc49d8e3ab715d78426 Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/3rdparty/javascriptcore')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefCountedLeakCounter.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefCountedLeakCounter.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefCountedLeakCounter.cpp
index 80922d3..f581b6a 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefCountedLeakCounter.cpp
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/RefCountedLeakCounter.cpp
@@ -39,7 +39,9 @@ void RefCountedLeakCounter::decrement() { }
#else
#define LOG_CHANNEL_PREFIX Log
+#if !defined(LOG_DISABLED) || !LOG_DISABLED
static WTFLogChannel LogRefCountedLeaks = { 0x00000000, "", WTFLogChannelOn };
+#endif
typedef HashCountedSet<const char*, PtrHash<const char*> > ReasonSet;
static ReasonSet* leakMessageSuppressionReasons;