summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFranziska Hinkelmann <franzih@chromium.org>2017-03-26 11:16:27 +0200
committerFranziska Hinkelmann <franzih@chromium.org>2017-03-28 18:34:23 +0200
commitfd18243a50cba987063187b3ff95a2407ed348fa (patch)
tree9b10716eeaa2e94f607dab4f3ed4957a912f60bf /test
parent01ffe30d1875cd4ccd17fc671f7438923e69dcd4 (diff)
downloadandroid-node-v8-fd18243a50cba987063187b3ff95a2407ed348fa.tar.gz
android-node-v8-fd18243a50cba987063187b3ff95a2407ed348fa.tar.bz2
android-node-v8-fd18243a50cba987063187b3ff95a2407ed348fa.zip
test: fix misleading comment
The comment is outdated, function declarations have nothing to do with defineProperties. PR-URL: https://github.com/nodejs/node/pull/12048 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-vm-function-declaration.js6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/parallel/test-vm-function-declaration.js b/test/parallel/test-vm-function-declaration.js
index 70a8188405..d42a3a3f48 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