From 62f2395fb34a4dd63c40427063e0909d7b8b8aec Mon Sep 17 00:00:00 2001 From: lodr Date: Tue, 21 May 2013 19:07:32 +0200 Subject: [PATCH] Adding filterLeaks() condition to not consider indices in global object as leaks --- lib/runner.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/runner.js b/lib/runner.js index 436980899e..7639bc7585 100644 --- a/lib/runner.js +++ b/lib/runner.js @@ -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)