From bdd2b203004f13df454c2af267b4a8c3f318414d Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Mon, 13 Feb 2006 20:21:20 +0000 Subject: [PATCH] Followup to bug 325229 - don't stick bell in stderr on platforms that have a dbgdlg git-svn-id: svn://10.0.0.236/trunk@189854 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/xpcom/base/nsDebugImpl.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/mozilla/xpcom/base/nsDebugImpl.cpp b/mozilla/xpcom/base/nsDebugImpl.cpp index ca4a4043868..a3b1153cc70 100644 --- a/mozilla/xpcom/base/nsDebugImpl.cpp +++ b/mozilla/xpcom/base/nsDebugImpl.cpp @@ -265,17 +265,17 @@ NS_DebugBreak(PRUint32 aSeverity, const char *aStr, const char *aExpr, switch (aSeverity) { case NS_DEBUG_ASSERTION: - sevString = "\07###!!! ASSERTION"; + sevString = "###!!! ASSERTION"; ll = PR_LOG_ERROR; break; case NS_DEBUG_BREAK: - sevString = "\07###!!! BREAK"; + sevString = "###!!! BREAK"; ll = PR_LOG_ALWAYS; break; case NS_DEBUG_ABORT: - sevString = "\07###!!! ABORT"; + sevString = "###!!! ABORT"; ll = PR_LOG_ALWAYS; break; @@ -297,11 +297,17 @@ NS_DebugBreak(PRUint32 aSeverity, const char *aStr, const char *aExpr, if (aLine != -1) PR_sxprintf(StuffFixedBuffer, &buf, "line %d", aLine); - // Write out the assertion message to the debug log + // Write out the message to the debug log PR_LOG(gDebugLog, ll, ("%s", buf.buffer)); PR_LogFlush(); - // And write it out to the stderr + // errors on platforms without a debugdlg ring a bell on stderr +#if !defined(XP_WIN) && !defined(XP_OS2) + if (ll != PR_LOG_WARNING) + fprintf(stderr, "\07"); +#endif + + // Write the message to stderr fprintf(stderr, "%s\n", buf.buffer); fflush(stderr);