Skip to content

Commit

Permalink
Adding filterLeaks() condition to not consider indices in global obje…
Browse files Browse the repository at this point in the history
…ct as leaks
  • Loading branch information
delapuente committed May 21, 2013
1 parent 176ead5 commit 62f2395
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,8 @@ Runner.prototype.run = function(fn){

function filterLeaks(ok, globals) {
return filter(globals, function(key){
// Firefox and Chrome exposes iframes as index inside the window object
if (/^d+/.test(key)) return false;
var matched = filter(ok, function(ok){
if (~ok.indexOf('*')) return 0 == key.indexOf(ok.split('*')[0]);
// Opera and IE expose global variables for HTML element IDs (issue #243)
Expand Down

0 comments on commit 62f2395

Please sign in to comment.