Bug 764346 - Let Error Console filter match more properties like source, line. r=jaws
authorTom Schuster <evilpies@gmail.com>
Tue, 19 Jun 2012 17:24:58 +0200
changeset 25510 68815265965fcc0b896fcba4c6190354628436eb
parent 25509 f0eb7f53b20b97e75c30f2e19bcaf8ecafb29824
child 25511 ef5dccd43a04ff6f4e6193b2afe0acf6e992b90d
push id1725
push userclokep@gmail.com
push dateMon, 19 Sep 2016 17:35:08 +0000
treeherdercomm-beta@6ead1abf3817 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs764346
Bug 764346 - Let Error Console filter match more properties like source, line. r=jaws
suite/common/console/consoleBindings.xml
--- a/suite/common/console/consoleBindings.xml
+++ b/suite/common/console/consoleBindings.xml
@@ -305,17 +305,22 @@
           this.mConsoleRowBox = newRows;
           this.selectedItem = null;
         ]]></body>
       </method>
 
       <method name="filterElement">
         <parameter name="aRow" />
         <body><![CDATA[
-          if (this.stringMatchesFilters(aRow.getAttribute("msg"), this.mFilter)) {
+          let anyMatch = ["msg", "href", "line", "code"].some(function (key) {
+            return (aRow.hasAttribute(key) && 
+                    this.stringMatchesFilters(aRow.getAttribute(key), this.mFilter));
+          }, this);
+
+          if (anyMatch) {
             aRow.classList.remove("filtered-by-string")
           } else {
             aRow.classList.add("filtered-by-string")
           }
         ]]></body>
       </method>
 
       <method name="applyFilter">