Skip to content

Commit a6ea276

Browse files
committed
Make prefixing explicit
1 parent e29d1cb commit a6ea276

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/chrome/content/code/HTTPSRules.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,19 +639,20 @@ const HTTPSRules = {
639639
req.send();
640640
var domains = req.response.split("\n");
641641
var domains_l = domains.length - 1; // The last entry in this thing is bogus
642+
var prefix = "";
642643
this.log(WARN, "Calling potentiallyApplicableRulesets() with " + domains_l + " domains");
643644
var count = 0;
644645
var t1 = new Date().getTime();
645646
for (var n = 0; n < domains_l; n++) {
646-
if (this.potentiallyApplicableRulesets("www." + domains[n]).length != 0)
647+
if (this.potentiallyApplicableRulesets(prefix + domains[n]).length != 0)
647648
count++;
648649
}
649650
var t2 = new Date().getTime();
650651
this.log(NOTE, count + " hits: average call to potentiallyApplicableRulesets took " + (t2 - t1) / domains_l + " milliseconds");
651652
count = 0;
652653
t1 = new Date().getTime();
653654
for (var n = 0; n < domains_l; n++) {
654-
if (this.potentiallyApplicableRulesets("www." + domains[n]).length != 0)
655+
if (this.potentiallyApplicableRulesets(prefix + domains[n]).length != 0)
655656
count++;
656657
}
657658
t2 = new Date().getTime();

0 commit comments

Comments
 (0)