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

Unified Diff: lib/elemHide.js

Issue 5229474392047616: Issue 2582 - Optimize loop in ElemHide.getSelectorsForDomain() for V8 (Closed)
Patch Set: Created May 24, 2015, 5:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/elemHide.js
===================================================================
--- a/lib/elemHide.js
+++ b/lib/elemHide.js
@@ -378,7 +378,8 @@
getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly)
{
let result = [];
- for (let key in filterByKey)
+ let keys = Object.keys(filterByKey);
+ for (let key of keys)
{
let filter = filterByKey[key];
if (specificOnly && (!filter.domains || filter.domains[""]))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld