diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2021-03-23 03:15:41 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-23 11:15:41 +0800 |
commit | 44394e61c95e29bcae68087d5ada2036be9b073d (patch) | |
tree | 8fbc33fe20d541919030f52f61cb5e1477f9b73e /test/ufuzz/index.js | |
parent | f9055df44d86c8537afc34f00bd255792f80422f (diff) | |
download | tracifyjs-44394e61c95e29bcae68087d5ada2036be9b073d.tar.gz tracifyjs-44394e61c95e29bcae68087d5ada2036be9b073d.zip |
workaround `toString()` quirks on global context (#4814)
Diffstat (limited to 'test/ufuzz/index.js')
-rw-r--r-- | test/ufuzz/index.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/ufuzz/index.js b/test/ufuzz/index.js index e2bcdf2c..768009a9 100644 --- a/test/ufuzz/index.js +++ b/test/ufuzz/index.js @@ -2206,8 +2206,7 @@ function log(options) { function sort_globals(code) { var globals = run_code("throw Object.keys(this).sort(" + function(global) { return function(m, n) { - return (n == "toString") - (m == "toString") - || (typeof global[n] == "function") - (typeof global[m] == "function") + return (typeof global[n] == "function") - (typeof global[m] == "function") || (m < n ? -1 : m > n ? 1 : 0); }; } + "(this));" + code); |