New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node_contextify tracking issue #6283

Closed
ofrobots opened this Issue Apr 19, 2016 · 24 comments

Comments

Projects
None yet
10 participants
@ofrobots
Contributor

ofrobots commented Apr 19, 2016

The implementation of the vm module has some limitation that results in non-intuitive behaviour. There are already a few bugs open for this (see list below). At this point I do not think there are incremental fixes that can solve the issues with the vm module. I suspect that a revamp of the vm module might be needed, with some API help from the V8 team, to fix these issues properly.

Existing open issues:

  • #855: references to context inside objects are not === the original context
  • #2734: accessor properties get converted to data properties
  • #5350: inherited properties get flattened
  • #6158: Proxy passed as vm context hides built-in properties
  • #5344: Strict mode global property update should not succeed
  • #5679: Object.defineProperty
  • [code comment] Async updates in context aren't reflected in the sandbox object.
  • #548, fixed upstream in V8 (September 2016)
  • nodejs/node-v0.x-archive#9084 (but it may be a dupe of #769 which was fixed in recent V8)
  • #6287 deleting a property in a context has no effect
  • #7458 Built-in properties cannot be accessed using Reflect, when Proxy is passed as vm context
  • #12300 vm: strict mode ReferenceError with assignment to context property
  • probably more that I am not aware of... (please add in comments below and I will update the issue)

I am creating this issue to make it easier to keep track of these issues, and possible solutions.

/cc @nodejs/v8 @domenic.

@ofrobots ofrobots added the vm label Apr 19, 2016

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Apr 19, 2016

Member
Member

domenic commented Apr 19, 2016

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel
Member

fhinkel commented Jul 2, 2016

fhinkel added a commit to fhinkel/node that referenced this issue Jul 22, 2016

Proof of Concept: intercept defineProperty()
A lot of contextify issues seem to be related to the fact that we
cannot intercept defineProperty(), see
nodejs#6283.

Here is a proof of concept implementation that gets rid of the
CopyProperties() hack in contextify. For simplicty, only getters from the
descriptors are copied. Also, function declarations are not intercepted,
but that should be easy to do.

It'll be a while until I get this cleanly into V8, but I think once the
V8 API allows for intercepting defineProperty() and function declarations,
a lot of contextify issues can be solved.

@fhinkel fhinkel self-assigned this Sep 7, 2016

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Sep 29, 2016

Member

The problem is API design that I can tell. We "enhance" and return the sandbox object passed in to vm.createContext() but the behavior of the v8::Context::Global() in v8 cannot delegate fully with behaviors back to the sandbox (like Object.defineProperty). We should really return a new Proxy from vm.createContext that can propagate into the VM Global(). This is a breaking change but this relates to most of this list.

Member

bmeck commented Sep 29, 2016

The problem is API design that I can tell. We "enhance" and return the sandbox object passed in to vm.createContext() but the behavior of the v8::Context::Global() in v8 cannot delegate fully with behaviors back to the sandbox (like Object.defineProperty). We should really return a new Proxy from vm.createContext that can propagate into the VM Global(). This is a breaking change but this relates to most of this list.

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Sep 29, 2016

Member

We discussed the proxy idea in #7820.

We made API changes in V8. Fixing the issues here should be possible as soon as we pull in a newer V8 version.

Member

fhinkel commented Sep 29, 2016

We discussed the proxy idea in #7820.

We made API changes in V8. Fixing the issues here should be possible as soon as we pull in a newer V8 version.

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Sep 29, 2016

Member

@fhinkel that was describing a Proxy inside of the Context as the Global proxy, I was thinking of a Proxy outside of the v8::Context and using something like newRemoteContext. The use case described by @domenic to my knowledge was around needing to generate the Global() reference (that is ===) prior to creating a full context. Looking at the code as well, it seems that Node should be using FromSnapshot which it currently does not. If possible I would like to move away from interceptors if possible.

Member

bmeck commented Sep 29, 2016

@fhinkel that was describing a Proxy inside of the Context as the Global proxy, I was thinking of a Proxy outside of the v8::Context and using something like newRemoteContext. The use case described by @domenic to my knowledge was around needing to generate the Global() reference (that is ===) prior to creating a full context. Looking at the code as well, it seems that Node should be using FromSnapshot which it currently does not. If possible I would like to move away from interceptors if possible.

@isiahmeadows

This comment has been minimized.

Show comment
Hide comment
@isiahmeadows

isiahmeadows Oct 3, 2016

BTW the box for #5344 should probably now be checked, since that issue is now closed.

isiahmeadows commented Oct 3, 2016

BTW the box for #5344 should probably now be checked, since that issue is now closed.

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel
Member

fhinkel commented Dec 11, 2016

@cpojer

This comment has been minimized.

Show comment
Hide comment
@cpojer

cpojer Dec 15, 2016

I'm really excited about improvements to vm context. Jest, the JavaScript testing framework, heavily uses the vm module to isolate tests. Is there any way we can make sure that Jest keeps working or that we are aware of potential breaking changes? Is it at all possible for you to include yarn test (or yarn test -i to run everything within a single process) inside of the Jest repo to the test plans for changes here? Jest is used for testing by a ton of companies, so it may make sense to ensure we don't break anything here and that we are aware of changes that are coming.

It may actually be a good real-world test for you, too. I'm happy to talk more about the architecture but in essence Jest parallelizes across worker processes and has a custom node-like (or jsdom) env in a vm context that also comes with a powerful custom require implementation that can be used for module-boundary mocking.

I also had thoughts around vm.Script. It has the cached data feature via the produceCachedData and cachedData fields. I had hopes that this would speed up repeated script execution which could be pretty significant for Jest but was surprised there was no performance benefit of using this at all across thousands of test files and tens of thousands of modules at FB. Besides the API of this feature, which is really odd, is there any way this feature can be changed to be more efficient? I kind of don't really get why v8 has to validate the cached data as that also requires to store both the original source and the cached data. This may be topic for a separate issue but I just wanted to bring it up.

Context:

cpojer commented Dec 15, 2016

I'm really excited about improvements to vm context. Jest, the JavaScript testing framework, heavily uses the vm module to isolate tests. Is there any way we can make sure that Jest keeps working or that we are aware of potential breaking changes? Is it at all possible for you to include yarn test (or yarn test -i to run everything within a single process) inside of the Jest repo to the test plans for changes here? Jest is used for testing by a ton of companies, so it may make sense to ensure we don't break anything here and that we are aware of changes that are coming.

It may actually be a good real-world test for you, too. I'm happy to talk more about the architecture but in essence Jest parallelizes across worker processes and has a custom node-like (or jsdom) env in a vm context that also comes with a powerful custom require implementation that can be used for module-boundary mocking.

I also had thoughts around vm.Script. It has the cached data feature via the produceCachedData and cachedData fields. I had hopes that this would speed up repeated script execution which could be pretty significant for Jest but was surprised there was no performance benefit of using this at all across thousands of test files and tens of thousands of modules at FB. Besides the API of this feature, which is really odd, is there any way this feature can be changed to be more efficient? I kind of don't really get why v8 has to validate the cached data as that also requires to store both the original source and the cached data. This may be topic for a separate issue but I just wanted to bring it up.

Context:

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Dec 15, 2016

Member

Good idea to use Jest tests as test cases for vm changes. Anything we break, we can add as regression tests (and fix it of course). The vm module could certainly have a better test coverage.

@bnoordhuis recently ran some benchmarks with and without vm. Slowdown is pretty dramatic. Definitely worth looking into how to speed it up.

Member

fhinkel commented Dec 15, 2016

Good idea to use Jest tests as test cases for vm changes. Anything we break, we can add as regression tests (and fix it of course). The vm module could certainly have a better test coverage.

@bnoordhuis recently ran some benchmarks with and without vm. Slowdown is pretty dramatic. Definitely worth looking into how to speed it up.

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Dec 15, 2016

Member

@cpojer in order to see speed gains vs the IO you need to implement a large cache store, doing it per file might actually slow things down. I can walk you through it sometime if you want.

Member

bmeck commented Dec 15, 2016

@cpojer in order to see speed gains vs the IO you need to implement a large cache store, doing it per file might actually slow things down. I can walk you through it sometime if you want.

@cpojer

This comment has been minimized.

Show comment
Hide comment
@cpojer

cpojer Dec 15, 2016

A large cache store of what? In the third link I shared above you can see how we share vm.Script instances during a single run; as long as the file doesn't change, so there isn't any IO involved.

cpojer commented Dec 15, 2016

A large cache store of what? In the third link I shared above you can see how we share vm.Script instances during a single run; as long as the file doesn't change, so there isn't any IO involved.

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Dec 15, 2016

Member

@cpojer i see no call w/ produceCachedData and no file in which those results are stored in the source https://github.com/facebook/jest/search?utf8=%E2%9C%93&q=produceCachedData&type=Issues . Even if this is implemented the wrapper you show has a per file cache of the source transform, and it can be expensive to load in cache files off disk ad-hoc vs as a large bundle of cachedData. This is somewhat off topic and might be better done offline.

Member

bmeck commented Dec 15, 2016

@cpojer i see no call w/ produceCachedData and no file in which those results are stored in the source https://github.com/facebook/jest/search?utf8=%E2%9C%93&q=produceCachedData&type=Issues . Even if this is implemented the wrapper you show has a per file cache of the source transform, and it can be expensive to load in cache files off disk ad-hoc vs as a large bundle of cachedData. This is somewhat off topic and might be better done offline.

@cjihrig

This comment has been minimized.

Show comment
Hide comment
@cjihrig

cjihrig Dec 16, 2016

Contributor

@thealphanerd perhaps we should add jest to CITGM. Looks like it was mentioned in nodejs/citgm#127.

Contributor

cjihrig commented Dec 16, 2016

@thealphanerd perhaps we should add jest to CITGM. Looks like it was mentioned in nodejs/citgm#127.

@MylesBorins

This comment has been minimized.

Show comment
Hide comment
@MylesBorins

MylesBorins Dec 16, 2016

Member

I've pinged someone to put together a PR of the various testing frameworks.

Member

MylesBorins commented Dec 16, 2016

I've pinged someone to put together a PR of the various testing frameworks.

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Feb 5, 2017

Member

67af1ad replaces call into JS in CopyProperties() with correct API call.

Member

fhinkel commented Feb 5, 2017

67af1ad replaces call into JS in CopyProperties() with correct API call.

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Feb 13, 2017

Member

@cpojer I'm running npm test in Jest after making changes to Node core. Anything else I can run to make sure my vm fixes don't break anything in Jest?

Member

fhinkel commented Feb 13, 2017

@cpojer I'm running npm test in Jest after making changes to Node core. Anything else I can run to make sure my vm fixes don't break anything in Jest?

@targos

This comment has been minimized.

Show comment
Hide comment
@targos

targos Feb 13, 2017

Member

@fhinkel I suppose it would be useful to run jsdom tests too.

Member

targos commented Feb 13, 2017

@fhinkel I suppose it would be useful to run jsdom tests too.

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Feb 13, 2017

Member

I can't get them to pass even without my changes 😞

Member

fhinkel commented Feb 13, 2017

I can't get them to pass even without my changes 😞

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

domenic Feb 13, 2017

Member

@fhinkel feel free to open an issue with the failures

Member

domenic commented Feb 13, 2017

@fhinkel feel free to open an issue with the failures

@cpojer

This comment has been minimized.

Show comment
Hide comment
@cpojer

cpojer Feb 13, 2017

@fhinkel yes, unless you are significantly changing behavior, running "npm test" on Jest's repo should work. Thank you so much for reaching out!

cpojer commented Feb 13, 2017

@fhinkel yes, unless you are significantly changing behavior, running "npm test" on Jest's repo should work. Thank you so much for reaching out!

@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Feb 13, 2017

Member

I didn't configure the web platform tests, so it's probably my fault. But I get the same failures with and without my changes, I'll take that as no regression.

Member

fhinkel commented Feb 13, 2017

I didn't configure the web platform tests, so it's probably my fault. But I get the same failures with and without my changes, I'll take that as no regression.

@AnnaMag

This comment has been minimized.

Show comment
Hide comment
@AnnaMag

AnnaMag Jun 3, 2017

Member

Progress update: solution to the issues occurring due to the CP() hack is ready, pending another pair of eyes willing to review the code + V8 changes to be approved and land 😄
#13265

Member

AnnaMag commented Jun 3, 2017

Progress update: solution to the issues occurring due to the CP() hack is ready, pending another pair of eyes willing to review the code + V8 changes to be approved and land 😄
#13265

@bmeck bmeck referenced this issue Sep 15, 2017

Closed

Possible fix for #15374 #15389

2 of 2 tasks complete

fhinkel added a commit to fhinkel/node that referenced this issue Oct 18, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium-review.googlesource.com/c/v8/v8/+/725295

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 18, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

@fhinkel fhinkel referenced this issue Oct 18, 2017

Closed

src: use new V8 API in vm module #16293

6 of 8 tasks complete

fhinkel added a commit to fhinkel/node that referenced this issue Oct 19, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 20, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 20, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 20, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 20, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 23, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 23, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

Refs: nodejs#6283
Refs: nodejs#15114
Refs: nodejs#13265

Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902

fhinkel added a commit to fhinkel/node that referenced this issue Oct 23, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

PR-URL: nodejs#16293
Fixes: nodejs#2734
Fixes: nodejs#10223
Fixes: nodejs#11803
Fixes: nodejs#11902
Ref: nodejs#6283
Ref: nodejs#15114
Ref: nodejs#13265
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@fhinkel

This comment has been minimized.

Show comment
Hide comment
@fhinkel

fhinkel Oct 23, 2017

Member

@ofrobots The remaining 4 issues are not related. Should we close this tracking issue?

Member

fhinkel commented Oct 23, 2017

@ofrobots The remaining 4 issues are not related. Should we close this tracking issue?

addaleax added a commit to ayojs/ayo that referenced this issue Oct 26, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs/node#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs/node#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

PR-URL: nodejs/node#16293
Fixes: nodejs/node#2734
Fixes: nodejs/node#10223
Fixes: nodejs/node#11803
Fixes: nodejs/node#11902
Ref: nodejs/node#6283
Ref: nodejs/node#15114
Ref: nodejs/node#13265
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@ofrobots

This comment has been minimized.

Show comment
Hide comment
@ofrobots

ofrobots Oct 27, 2017

Contributor

Agree. Closing.

Contributor

ofrobots commented Oct 27, 2017

Agree. Closing.

@ofrobots ofrobots closed this Oct 27, 2017

addaleax added a commit to ayojs/ayo that referenced this issue Dec 7, 2017

src: use new V8 API in vm module
Remove the CopyProperties() hack in the vm module, i.e., Contextify.
Use different V8 API methods, that allow interception of
DefineProperty() and do not flatten accessor descriptors to
property descriptors.

Move many known issues to test cases. Factor out the last test in
test-vm-context.js for
nodejs/node#10223
into its own file, test-vm-strict-assign.js.

Part of this CL is taken from a stalled PR by
https://github.com/AnnaMag
nodejs/node#13265

This PR requires a backport of
https://chromium.googlesource.com/v8/v8/+/37a3a15c3e52e2146e45f41c427f24414e4d7f6f

PR-URL: nodejs/node#16293
Fixes: nodejs/node#2734
Fixes: nodejs/node#10223
Fixes: nodejs/node#11803
Fixes: nodejs/node#11902
Ref: nodejs/node#6283
Ref: nodejs/node#15114
Ref: nodejs/node#13265
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment