Skip to content

Commit

Permalink
Merge pull request #854 from lodr/fix-ignore-iframes-as-window-indices
Browse files Browse the repository at this point in the history
Adding filterLeaks() condition to not consider indices in global object as leaks
  • Loading branch information
tj committed May 22, 2013
2 parents 80410cd + 62f2395 commit 2b6cf88
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 2b6cf88

Please sign in to comment.