Bug 107264 - Make prefs parser errors louder. r=glandium
MozReview-Commit-ID: Ah36kygP3ix
--- a/modules/libpref/Preferences.cpp
+++ b/modules/libpref/Preferences.cpp
@@ -1101,20 +1101,22 @@ private:
static void HandleError(const char* aMsg)
{
nsresult rv;
nsCOMPtr<nsIConsoleService> console =
do_GetService("@mozilla.org/consoleservice;1", &rv);
if (NS_SUCCEEDED(rv)) {
console->LogStringMessage(NS_ConvertUTF8toUTF16(aMsg).get());
- } else {
- printf_stderr("%s\n", aMsg);
}
- NS_WARNING(aMsg);
+#ifdef DEBUG
+ NS_ERROR(aMsg);
+#else
+ printf_stderr("%s\n", aMsg);
+#endif
}
// This is static so that HandlePref() can increment it easily. This is ok
// because prefs files are read one at a time.
static uint32_t sNumPrefs;
};
uint32_t Parser::sNumPrefs = 0;