From 0013cbf91f5a833eb51e3473ef2f18844f722ae9 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Wed, 30 Dec 2020 13:53:03 +0000 Subject: [PATCH] improve false positive detection in `ufuzz` (#4482) --- test/ufuzz/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index e5bf0083..23b3a144 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -1710,7 +1710,9 @@ function log(options) { function sort_globals(code) { var globals = sandbox.run_code("throw Object.keys(this).sort();" + code); - return globals.length ? "var " + globals.join(",") + ";" + code : code; + return globals.length ? "var " + globals.map(function(name) { + return name + "=" + name; + }).join(",") + ";" + code : code; } function fuzzy_match(original, uglified) { -- 2.34.1