From 44394e61c95e29bcae68087d5ada2036be9b073d Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 23 Mar 2021 03:15:41 +0000 Subject: workaround `toString()` quirks on global context (#4814) --- test/ufuzz/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/ufuzz/index.js') 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); -- cgit v1.2.3