bug 579975 - logConsoleActivity message filtering bug, r=mossop
authorMihai Sucan <robodesign@gmail.com>
Wed, 21 Jul 2010 12:24:12 -0300
changeset 48004 a90e16166da9d9acd2cacf739e07e4807fa5df6a
parent 48003 0ff1f958c76b9525c91b1287daef246aff8bf052
child 48005 48cb278e9e6941759cef76139278e633d7162d4e
push id14531
push userrcampbell@mozilla.com
push dateWed, 21 Jul 2010 15:24:47 +0000
treeherdermozilla-central@a90e16166da9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmossop
bugs579975
milestone2.0b3pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 579975 - logConsoleActivity message filtering bug, r=mossop
toolkit/components/console/hudservice/HUDService.jsm
--- a/toolkit/components/console/hudservice/HUDService.jsm
+++ b/toolkit/components/console/hudservice/HUDService.jsm
@@ -1120,38 +1120,38 @@ HUD_SERVICE.prototype =
       if (!displayNode) {
         return;
       }
     }
 
     var _msgLogLevel = this.scriptMsgLogLevel[aActivityObject.flags];
     var msgLogLevel = this.getStr(_msgLogLevel);
 
+    var logLevel = "warn";
+
+    if (aActivityObject.flags in this.scriptErrorFlags) {
+      logLevel = this.scriptErrorFlags[aActivityObject.flags];
+    }
+
     // check if we should be logging this message:
-    var filterState = this.getFilterState(hudId, msgLogLevel);
+    var filterState = this.getFilterState(hudId, logLevel);
 
     if (!filterState) {
       // Ignore log message
       return;
     }
 
     // in this case, the "activity object" is the
     // nsIScriptError or nsIConsoleMessage
     var message = {
       activity: aActivityObject,
       origin: "console-listener",
       hudId: hudId,
     };
 
-    try {
-      var logLevel = this.scriptErrorFlags[aActivityObject.flags];
-    }
-    catch (ex) {
-      var logLevel = "warn";
-    }
     var lineColSubs = [aActivityObject.columnNumber,
                        aActivityObject.lineNumber];
     var lineCol = this.getFormatStr("errLineCol", lineColSubs);
 
     var errFileSubs = [aActivityObject.sourceName];
     var errFile = this.getFormatStr("errFile", errFileSubs);
 
     var msgCategory = this.getStr("msgCategory");