avoid Function.prototype pollution by test/sandbox.js

This commit is contained in:
alexlamsl 2017-12-12 03:52:03 +08:00
parent ebfd5c5c74
commit 2d49a48460

View 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 = "";