From 2d49a48460eca43867ad5b1f60aa750c3255d5a1 Mon Sep 17 00:00:00 2001 From: alexlamsl Date: Tue, 12 Dec 2017 03:52:03 +0800 Subject: [PATCH] avoid `Function.prototype` pollution by `test/sandbox.js` --- 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 = "";