Skip to content

Commit 18ca9cf

Browse files
committed
Remove random try/catch
Not clear to me what this was catching... Signed-off-by: Nick Semenkovich <semenko@alum.mit.edu>
1 parent 992b995 commit 18ca9cf

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

chromium/rules.js

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ RuleSet.prototype = {
4545
return null;
4646
}
4747
}
48-
// If a rulset has a match_rule and it fails, go no further
48+
// If a ruleset has a match_rule and it fails, go no further
4949
if (this.ruleset_match_c && !this.ruleset_match_c.test(urispec)) {
5050
log(VERB, "ruleset_match_c excluded " + urispec);
5151
return null;
@@ -290,16 +290,8 @@ RuleSets.prototype = {
290290
// If we passed that test, make up a random URL on the domain, and see if
291291
// we would HTTPSify that.
292292

293-
try {
294-
var nonce_path = "/" + Math.random().toString();
295-
nonce_path = nonce_path + nonce_path;
296-
var test_uri = "http://" + domain + nonce_path;
297-
} catch (e) {
298-
log(WARN, "explosion in safeToSecureCookie for " + domain + "\n"
299-
+ "(" + e + ")");
300-
this.cookieHostCache.set(domain, false);
301-
return false;
302-
}
293+
var nonce_path = "/" + Math.random().toString();
294+
var test_uri = "http://" + domain + nonce_path + nonce_path;
303295

304296
log(INFO, "Testing securecookie applicability with " + test_uri);
305297
var rs = this.potentiallyApplicableRulesets(domain);

0 commit comments

Comments
 (0)