Skip to content

Commit d8b71be

Browse files
fhinkelMylesBorins
authored andcommittedMar 28, 2017
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 fade55b commit d8b71be

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

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

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@ const assert = require('assert');
55
const vm = require('vm');
66
const o = vm.createContext({ console: console });
77

8-
// This triggers the setter callback in node_contextify.cc
8+
// Function declaration and expression should both be copied to the
9+
// sandboxed context.
910
let code = 'var a = function() {};\n';
10-
11-
// but this does not, since function decls are defineProperties,
12-
// not simple sets.
1311
code += 'function b(){}\n';
1412

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

0 commit comments

Comments
 (0)
Please sign in to comment.