Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: chrome/content/watcher.js

Issue 29333128: Issue 3463 - Filtering broken in Diagnostics (Closed)
Left Patch Set: Created Jan. 4, 2016, 2:22 p.m.
Right Patch Set: Don`t use non-standard Iterator constructor Created Jan. 4, 2016, 2:27 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 /* 1 /*
2 * This Source Code is subject to the terms of the Mozilla Public License 2 * This Source Code is subject to the terms of the Mozilla Public License
3 * version 2.0 (the "License"). You can obtain a copy of the License at 3 * version 2.0 (the "License"). You can obtain a copy of the License at
4 * http://mozilla.org/MPL/2.0/. 4 * http://mozilla.org/MPL/2.0/.
5 */ 5 */
6 6
7 const Cc = Components.classes; 7 const Cc = Components.classes;
8 const Ci = Components.interfaces; 8 const Ci = Components.interfaces;
9 const Cr = Components.results; 9 const Cr = Components.results;
10 const Cu = Components.utils; 10 const Cu = Components.utils;
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 { 403 {
404 this._filterString = value.toLowerCase(); 404 this._filterString = value.toLowerCase();
405 this.refilter(); 405 this.refilter();
406 }, 406 },
407 407
408 filter: function(entry) 408 filter: function(entry)
409 { 409 {
410 if (this._filterString) 410 if (this._filterString)
411 { 411 {
412 let foundMatch = false; 412 let foundMatch = false;
413 for (let [col, label] of new Iterator(entry.cols)) 413 for (let col in entry.cols)
414 if (label.toLowerCase().indexOf(this._filterString) >= 0) 414 if (entry.cols[col].toLowerCase().indexOf(this._filterString) >= 0)
415 foundMatch = true; 415 foundMatch = true;
416 416
417 if (!foundMatch) 417 if (!foundMatch)
418 return false; 418 return false;
419 } 419 }
420 return true; 420 return true;
421 }, 421 },
422 422
423 compare: function(entry1, entry2) 423 compare: function(entry1, entry2)
424 { 424 {
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 for (let i = 0; i < this.observers.length; i++) 529 for (let i = 0; i < this.observers.length; i++)
530 if (this.observers[i] == observer) 530 if (this.observers[i] == observer)
531 this.observers.splice(i--, 1); 531 this.observers.splice(i--, 1);
532 }, 532 },
533 notifyObservers: function(operation, entry) 533 notifyObservers: function(operation, entry)
534 { 534 {
535 for (let observer of this.observers) 535 for (let observer of this.observers)
536 observer(this, operation, entry); 536 observer(this, operation, entry);
537 } 537 }
538 }; 538 };
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
This is Rietveld