Skip to content

Commit

Permalink
test: fix misleading comment
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fhinkel committed Mar 28, 2017
1 parent 01ffe30 commit fd18243
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/parallel/test-vm-function-declaration.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fd18243

Please sign in to comment.