Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit eb19acb

Browse filesBrowse files
fhinkelMylesBorins
authored andcommitted
test: fix misleading comment
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>
1 parent 9dda771 commit eb19acb
Copy full SHA for eb19acb

File tree

Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-4
lines changed
Open diff view settings
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-vm-function-declaration.js
+2-4Lines changed: 2 additions & 4 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.