From 3be5bc7fce1d982d13855cbba434f08033188197 Mon Sep 17 00:00:00 2001 From: Franziska Hinkelmann Date: Sun, 26 Mar 2017 11:16:27 +0200 Subject: [PATCH] test: fix misleading comment The comment is outdated, function declarations have nothing to do with defineProperties. --- test/parallel/test-vm-function-declaration.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js index 70a8188405e7e9..d42a3a3f48058a 100644 --- a/test/parallel/test-vm-function-declaration.js +++ b/test/parallel/test-vm-function-declaration.js @@ -26,11 +26,9 @@ const assert = require('assert'); const vm = require('vm'); const o = vm.createContext({ console: console }); -// This triggers the setter callback in node_contextify.cc +// Function declaration and expression should both be copied to the +// sandboxed context. let code = 'var a = function() {};\n'; - -// but this does not, since function decls are defineProperties, -// not simple sets. code += 'function b(){}\n'; // Grab the global b function as the completion value, to ensure that