Bugzilla bug #63273: define PR_Assert in optimized builds too.
authorwtc%netscape.com
Tue, 19 Dec 2000 05:56:58 +0000
changeset 1641 ce293309b3fabbf6ecd389142f6c1afa8e223065
parent 1636 7f7dbb71b5fa33ff65ba0b4f57d43f7262ded995
child 1642 3f348f6edfd3a9098fa5d4daea2cd7e0ad3648df
push idunknown
push userunknown
push dateunknown
bugs63273
Bugzilla bug #63273: define PR_Assert in optimized builds too.
pr/src/io/prlog.c
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -474,33 +474,35 @@ PR_IMPLEMENT(void) PR_Abort(void)
 static void DebugBreak(void) { _interrupt(3); }
 #elif defined(XP_OS2_EMX)
 /* Force a trap */
 static void DebugBreak(void) { int *pTrap=NULL; *pTrap = 1; }
 #else
 static void DebugBreak(void) { }
 #endif
 #endif /* XP_OS2 */
+#endif /* DEBUG */
 
 PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn ln)
 {
+#ifdef DEBUG
     PR_LogPrint("Assertion failure: %s, at %s:%d\n", s, file, ln);
 #if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
     fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln);
 #endif
 #ifdef XP_MAC
     dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
 #endif
 #if defined(WIN32) || defined(XP_OS2)
     DebugBreak();
 #endif
 #ifndef XP_MAC
     abort();
 #endif
+#endif /* DEBUG */
 }
-#endif /* DEBUG */
 
 #ifdef XP_MAC
 PR_IMPLEMENT(void) PR_Init_Log(void)
 {
 	_PR_InitLog();
 }
 #endif