File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -271,7 +271,10 @@ RuleSets.prototype = {
271271 this . ruleCache . set ( host , results ) ;
272272
273273 // Cap the size of the cache. (Limit chosen somewhat arbitrarily)
274- if ( this . ruleCache . size > 1000 ) { this . ruleCache . delete ( this . ruleCache . keys ( ) . next ( ) . value ) }
274+ if ( this . ruleCache . size > 1000 ) {
275+ // Map.prototype.keys() returns keys in insertion order, so this is a FIFO.
276+ this . ruleCache . delete ( this . ruleCache . keys ( ) . next ( ) . value ) ;
277+ }
275278
276279 return results ;
277280 } ,
@@ -344,7 +347,10 @@ RuleSets.prototype = {
344347 var test_uri = "http://" + domain + nonce_path + nonce_path ;
345348
346349 // Cap the size of the cookie cache (limit chosen somewhat arbitrarily)
347- if ( this . cookieHostCache . size > 250 ) { this . cookieHostCache . delete ( this . cookieHostCache . keys ( ) . next ( ) . value ) }
350+ if ( this . cookieHostCache . size > 250 ) {
351+ // Map.prototype.keys() returns keys in insertion order, so this is a FIFO.
352+ this . cookieHostCache . delete ( this . cookieHostCache . keys ( ) . next ( ) . value ) ;
353+ }
348354
349355 log ( INFO , "Testing securecookie applicability with " + test_uri ) ;
350356 var rs = this . potentiallyApplicableRulesets ( domain ) ;
You can’t perform that action at this time.
0 commit comments