aboutsummaryrefslogtreecommitdiff
path: root/test/ufuzz/index.js
diff options
context:
space:
mode:
authorAlex Lam S.L <alexlamsl@gmail.com>2021-03-23 03:15:41 +0000
committerGitHub <noreply@github.com>2021-03-23 11:15:41 +0800
commit44394e61c95e29bcae68087d5ada2036be9b073d (patch)
tree8fbc33fe20d541919030f52f61cb5e1477f9b73e /test/ufuzz/index.js
parentf9055df44d86c8537afc34f00bd255792f80422f (diff)
downloadtracifyjs-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.js3
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);