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>
This commit is contained in:
parent
01ffe30d18
commit
fd18243a50
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user