From: Alex Lam S.L Date: Mon, 11 Dec 2017 21:02:01 +0000 (+0800) Subject: avoid `Function.prototype` pollution by `test/sandbox.js` (#2581) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ddf96cfda2a3e27b977e0ed8cca3896073513186;p=UglifyJS.git avoid `Function.prototype` pollution by `test/sandbox.js` (#2581) --- diff --git a/test/sandbox.js b/test/sandbox.js index fe2e588e..2ce9f6e1 100644 --- a/test/sandbox.js +++ b/test/sandbox.js @@ -37,6 +37,7 @@ var FUNC_TOSTRING = [ ' return "[Function: " + i + "]";', " }", "}();", + 'Object.defineProperty(Function.prototype, "valueOf", { enumerable: false });', ]).join("\n"); exports.run_code = function(code) { var stdout = "";