Skip to content

Commit fd18243

Browse files
committed
test: fix misleading comment
The comment is outdated, function declarations have nothing to do with defineProperties. PR-URL: #12048 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Yuta Hiroto <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 01ffe30 commit fd18243

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/parallel/test-vm-function-declaration.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ const assert = require('assert');
2626
const vm = require('vm');
2727
const o = vm.createContext({ console: console });
2828

29-
// This triggers the setter callback in node_contextify.cc
29+
// Function declaration and expression should both be copied to the
30+
// sandboxed context.
3031
let code = 'var a = function() {};\n';
31-
32-
// but this does not, since function decls are defineProperties,
33-
// not simple sets.
3432
code += 'function b(){}\n';
3533

3634
// Grab the global b function as the completion value, to ensure that

0 commit comments

Comments
 (0)