summaryrefslogtreecommitdiff
path: root/test/parallel/test-vm-context.js
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2017-01-20 19:36:57 +0100
committerAnna Henningsen <anna@addaleax.net>2017-01-25 15:43:51 -0800
commit3e851cf18b06c50df79f2ecc4dce0ec7379c2f41 (patch)
treeddc1c3bb938e220229805a82b7b7d7596b12cd5a /test/parallel/test-vm-context.js
parentdd928b04fc621a1d38bd8667a47baa9d106248c8 (diff)
downloadandroid-node-v8-3e851cf18b06c50df79f2ecc4dce0ec7379c2f41.tar.gz
android-node-v8-3e851cf18b06c50df79f2ecc4dce0ec7379c2f41.tar.bz2
android-node-v8-3e851cf18b06c50df79f2ecc4dce0ec7379c2f41.zip
Revert "src: don't overwrite non-writable vm globals"
This reverts commit 524f693872cf453af2655ec47356d25d52394e3d. Fixes: https://github.com/nodejs/node/issues/10806 Fixes: https://github.com/nodejs/node/issues/10492 Ref: https://github.com/nodejs/node/pull/10227 PR-URL: https://github.com/nodejs/node/pull/10920 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/parallel/test-vm-context.js')
-rw-r--r--test/parallel/test-vm-context.js11
1 files changed, 0 insertions, 11 deletions
diff --git a/test/parallel/test-vm-context.js b/test/parallel/test-vm-context.js
index 7056ce7be3..75d91ce812 100644
--- a/test/parallel/test-vm-context.js
+++ b/test/parallel/test-vm-context.js
@@ -75,14 +75,3 @@ assert.throws(function() {
// https://github.com/nodejs/node/issues/6158
ctx = new Proxy({}, {});
assert.strictEqual(typeof vm.runInNewContext('String', ctx), 'function');
-
-// https://github.com/nodejs/node/issues/10223
-ctx = vm.createContext();
-vm.runInContext('Object.defineProperty(this, "x", { value: 42 })', ctx);
-assert.strictEqual(ctx.x, undefined); // Not copied out by cloneProperty().
-assert.strictEqual(vm.runInContext('x', ctx), 42);
-vm.runInContext('x = 0', ctx); // Does not throw but x...
-assert.strictEqual(vm.runInContext('x', ctx), 42); // ...should be unaltered.
-assert.throws(() => vm.runInContext('"use strict"; x = 0', ctx),
- /Cannot assign to read only property 'x'/);
-assert.strictEqual(vm.runInContext('x', ctx), 42);