avoid `Function.prototype` pollution by `test/sandbox.js` (#2581)
authorAlex Lam S.L <alexlamsl@gmail.com>
Mon, 11 Dec 2017 21:02:01 +0000 (05:02 +0800)
committerGitHub <noreply@github.com>
Mon, 11 Dec 2017 21:02:01 +0000 (05:02 +0800)
test/sandbox.js

index fe2e588..2ce9f6e 100644 (file)
@@ -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 = "";