GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: failing behaviour on sandboxed Proxy · nodejs/node@8e5c8a3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test
    • known_issues
      • test-vm-proxy-failure-CP.js
    • parallel
      • test-vm-proxies.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/known_issues/test-vm-proxy-failure-CP.js‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
'use strict';
2+
3+
// Sandbox throws in CopyProperties() despite no code being run
4+
// Issue: https://github.com/nodejs/node/issues/11902
5+
6+
7+
require('../common');
8+
const assert = require('assert');
9+
const vm = require('vm');
10+
11+
const handler = {
12+
getOwnPropertyDescriptor: (target, prop) => {
13+
throw new Error('whoops');
14+
}
15+
};
16+
const sandbox = new Proxy({foo: 'bar'}, handler);
17+
const context = vm.createContext(sandbox);
18+
19+
20+
assert.doesNotThrow(() => vm.runInContext('', context));
Collapse file

‎test/parallel/test-vm-proxies.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-vm-proxies.js
-13Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,3 @@ sandbox = { Proxy: Proxy };
1616
vm.runInNewContext('this.Proxy = Proxy', sandbox);
1717
assert.strictEqual(typeof sandbox.Proxy, 'function');
1818
assert.strictEqual(sandbox.Proxy, Proxy);
19-
20-
// Handle a sandbox that throws while copying properties
21-
assert.throws(() => {
22-
const handler = {
23-
getOwnPropertyDescriptor: (target, prop) => {
24-
throw new Error('whoops');
25-
}
26-
};
27-
const sandbox = new Proxy({foo: 'bar'}, handler);
28-
const context = vm.createContext(sandbox);
29-
30-
vm.runInContext('', context);
31-
}, /whoops/);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.