From 212a022a9ffbf50eb4352bd338f01aa99323f192 Mon Sep 17 00:00:00 2001 From: Date: Mon, 7 Jan 2008 01:57:28 -0800 Subject: [PATCH] Bug 411032 - Separate the warning levels so that GTK+ warnings will only assert on something that deserves an assertion [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=roc a1.9=schrep] --- xpfe/bootstrap/nsSigHandlers.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xpfe/bootstrap/nsSigHandlers.cpp b/xpfe/bootstrap/nsSigHandlers.cpp index ca5f1d84aa19..d080ef095879 100644 --- a/xpfe/bootstrap/nsSigHandlers.cpp +++ b/xpfe/bootstrap/nsSigHandlers.cpp @@ -191,11 +191,13 @@ my_glib_log_func(const gchar *log_domain, GLogLevelFlags log_level, my_glib_log_func(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer user_data) { - orig_log_func(log_domain, log_level, message, NULL); - - if (log_level & (G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING)) { + if (log_level & (G_LOG_LEVEL_ERROR | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION)) { NS_DebugBreak(NS_DEBUG_ASSERTION, message, "glib assertion", __FILE__, __LINE__); + } else if (log_level & (G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_WARNING)) { + NS_DebugBreak(NS_DEBUG_WARNING, message, "glib warning", __FILE__, __LINE__); } + + orig_log_func(log_domain, log_level, message, NULL); } #endif