Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 411032 - Separate the warning levels so that GTK+ warnings will o…
Browse files Browse the repository at this point in the history
…nly assert on something that deserves an assertion [p=ventnor.bugzilla@yahoo.com.au (Michael Ventnor) r+sr=roc a1.9=schrep]
  • Loading branch information
reedloden committed Jan 7, 2008
1 parent def5aba commit 212a022
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions xpfe/bootstrap/nsSigHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 212a022

Please sign in to comment.