avoid Function.prototype pollution by test/sandbox.js (#2581)

This commit is contained in:
Alex Lam S.L
2017-12-12 05:02:01 +08:00
committed by GitHub
parent ebfd5c5c74
commit ddf96cfda2

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