From ddf96cfda2a3e27b977e0ed8cca3896073513186 Mon Sep 17 00:00:00 2001 From: "Alex Lam S.L" Date: Tue, 12 Dec 2017 05:02:01 +0800 Subject: [PATCH] avoid `Function.prototype` pollution by `test/sandbox.js` (#2581) --- test/sandbox.js | 1 + 1 file changed, 1 insertion(+) 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 = ""; -- 2.34.1