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 46b2e45

Browse filesBrowse files
AnnaMagMylesBorins
authored andcommitted
test: added test for indexed properties
Currently, indexed properties are correctly copied onto the sandbox by CopyProperties(). This will break when CopyProperties() is removed after adjusting NamedPropertyHandlerConfiguration config() to use property callbacks from the new V8 API. To fix it, we will set a config for indexed properties. This test is a preparation step for the patch that removes CopyProperties(). PR-URL: #11769 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Brian White <mscdex@mscdex.net>
1 parent a3f327f commit 46b2e45
Copy full SHA for 46b2e45

File tree

Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+17
-0
lines changed
Open diff view settings
Collapse file
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict';
2+
3+
require('../common');
4+
const assert = require('assert');
5+
const vm = require('vm');
6+
7+
const code = `Object.defineProperty(this, 99, {
8+
value: 20,
9+
enumerable: true
10+
});`;
11+
12+
13+
const sandbox = {};
14+
const ctx = vm.createContext(sandbox);
15+
vm.runInContext(code, ctx);
16+
17+
assert.strictEqual(sandbox[99], 20);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.