From d3de156b826fde38feefcc1a049eec60efd16a51 Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Mon, 7 May 2001 23:36:59 +0000 Subject: [PATCH] bug #78658: checking in Chris Seawoods trivial fix to prevent writing to the console in optimized builds, sr=scc (myself) --- string/obsolete/nsString.cpp | 3 ++- string/obsolete/nsString2.cpp | 3 ++- xpcom/string/obsolete/nsString.cpp | 3 ++- xpcom/string/obsolete/nsString2.cpp | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/string/obsolete/nsString.cpp b/string/obsolete/nsString.cpp index 2bad4c8dbb6e..4377aa874981 100644 --- a/string/obsolete/nsString.cpp +++ b/string/obsolete/nsString.cpp @@ -1363,10 +1363,11 @@ NS_COM int fputs(const nsCString& aString, FILE* out) * @update gess 11/15/99 */ void nsCString::DebugDump(void) const { - +#ifdef DEBUG if(mStr && (eOneByte==mCharSize)) { printf("\n%s",mStr); } +#endif } //---------------------------------------------------------------------- diff --git a/string/obsolete/nsString2.cpp b/string/obsolete/nsString2.cpp index b6d9a0d3dd98..e688699a1561 100644 --- a/string/obsolete/nsString2.cpp +++ b/string/obsolete/nsString2.cpp @@ -1599,7 +1599,7 @@ NS_COM int fputs(const nsString& aString, FILE* out) * @update gess 11/15/99 */ void nsString::DebugDump(void) const { - +#ifdef DEBUG const char* theBuffer=mStr; nsCAutoString temp; @@ -1611,6 +1611,7 @@ void nsString::DebugDump(void) const { if(theBuffer) { printf("\n%s",theBuffer); } +#endif } diff --git a/xpcom/string/obsolete/nsString.cpp b/xpcom/string/obsolete/nsString.cpp index 2bad4c8dbb6e..4377aa874981 100644 --- a/xpcom/string/obsolete/nsString.cpp +++ b/xpcom/string/obsolete/nsString.cpp @@ -1363,10 +1363,11 @@ NS_COM int fputs(const nsCString& aString, FILE* out) * @update gess 11/15/99 */ void nsCString::DebugDump(void) const { - +#ifdef DEBUG if(mStr && (eOneByte==mCharSize)) { printf("\n%s",mStr); } +#endif } //---------------------------------------------------------------------- diff --git a/xpcom/string/obsolete/nsString2.cpp b/xpcom/string/obsolete/nsString2.cpp index b6d9a0d3dd98..e688699a1561 100644 --- a/xpcom/string/obsolete/nsString2.cpp +++ b/xpcom/string/obsolete/nsString2.cpp @@ -1599,7 +1599,7 @@ NS_COM int fputs(const nsString& aString, FILE* out) * @update gess 11/15/99 */ void nsString::DebugDump(void) const { - +#ifdef DEBUG const char* theBuffer=mStr; nsCAutoString temp; @@ -1611,6 +1611,7 @@ void nsString::DebugDump(void) const { if(theBuffer) { printf("\n%s",theBuffer); } +#endif }