diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2020-12-30 13:53:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-30 21:53:03 +0800 |
commit | 0013cbf91f5a833eb51e3473ef2f18844f722ae9 (patch) | |
tree | 4e3692f469f593631b78e2e4acf646891f4dab18 | |
parent | 1956edd503bde9db8e99d8a499d54d5a508f8bb8 (diff) | |
download | tracifyjs-0013cbf91f5a833eb51e3473ef2f18844f722ae9.tar.gz tracifyjs-0013cbf91f5a833eb51e3473ef2f18844f722ae9.zip |
improve false positive detection in `ufuzz` (#4482)
-rw-r--r-- | test/ufuzz/index.js | 4 |
1 files changed, 3 insertions, 1 deletions
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) { |