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 <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>
  • Loading branch information
fhinkel authored and MylesBorins committed Mar 28, 2017
1 parent fade55b commit d8b71be
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 @@ -5,11 +5,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 d8b71be

Please sign in to comment.