[Pkg-mozext-commits] [adblock-plus] 26/74: Issue 2582 - Optimize loop in ElemHide.getSelectorsForDomain() for V8

David Prévot taffit at moszumanska.debian.org
Tue Aug 11 12:07:07 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 74c20e57e3394f3553bdf4dd1e29de4747935a85
Author: Sebastian Noack <sebastian at adblockplus.org>
Date:   Sun May 24 19:12:01 2015 +0200

    Issue 2582 - Optimize loop in ElemHide.getSelectorsForDomain() for V8
---
 lib/elemHide.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/elemHide.js b/lib/elemHide.js
index 7e402c9..94c6242 100644
--- a/lib/elemHide.js
+++ b/lib/elemHide.js
@@ -378,7 +378,8 @@ let ElemHide = exports.ElemHide =
   getSelectorsForDomain: function(/**String*/ domain, /**Boolean*/ specificOnly)
   {
     let result = [];
-    for (let key in filterByKey)
+    let keys = Object.getOwnPropertyNames(filterByKey);
+    for (let key of keys)
     {
       let filter = filterByKey[key];
       if (specificOnly && (!filter.domains || filter.domains[""]))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list