| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM
The commit message seems okay … maybe “delete on vm context”? I think it’s clear what it refers to anyway.
Sorry, something went wrong.
There was a problem hiding this comment.
Maybe if (success.FromMaybe(false)) is a bit more readable?
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks. Done.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. A propos the commit log, my first thought was that it was fixing a bad delete C++ statement. Maybe you can reword it a little, perhaps s/delete/delete operator/?
Sorry, something went wrong.
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. Fixes nodejs#6287
Sorry, something went wrong.
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. PR-URL: #11266 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. PR-URL: #11266 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. PR-URL: nodejs#11266 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. PR-URL: nodejs#11266 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
|
A backport PR is required for this to land in v4 |
Sorry, something went wrong.
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. PR-URL: #11266 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
In the implementation of the vm module, if a property is successfully deleted on the sandbox, we also need to delete it on the global_proxy object. Therefore, we must not call args.GetReturnValue().Set(). We only intercept, i.e., call args.GetReturnValue().Set(), in the DeleterCallback, if Delete() failed, e.g. because the property was read only. PR-URL: #11266 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Except in the most recent versions of node, developers are unable to delete things from global when running code in a node vm. This means that enzyme is failing to clean up after itself when temporarily defining global.document for setState calls. This papers over the issue by explicitly setting global.document to undefined if it failed to be deleted. Relevant jest issue - jestjs/jest#3152 Relevant node pr - nodejs/node#11266
Except in the most recent versions of node, developers are unable to delete things from global when running code in a node vm. This means that enzyme is failing to clean up after itself when temporarily defining global.document for setState calls. This papers over the issue by explicitly setting global.document to undefined before attempting to delete. If the delete succeeds, the undefined value will be removed. Relevant jest issue - jestjs/jest#3152 Relevant node pr - nodejs/node#11266
|
So it seems that this is causing a failure over at firefox-devtools/debugger#2728 I'm not sure if this is a behavior change on our side, or if the repo in question was relying on the broken behavior /cc @fhinkel |
Sorry, something went wrong.
|
Also worth mentioning... this changed behavior, should we back this out of v6 LTS? |
Sorry, something went wrong.
|
Let's leave it out of v6 because it's a breaking change. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
In the implementation of the vm module, if a property is successfully deleted
on the sandbox, we also need to delete it on the global_proxy object. Therefore, we
must not call args.GetReturnValue().Set().
We only intercept, i.e., call args.GetReturnValue().Set(), in the
DeleterCallback, if Delete() failed, e.g. because
the property was read only.
This is a breaking change, it fixes one of our known issues. But it does not break any
tests in Jest.
Fixes #6287
Checklist
Affected core subsystem(s)
src
If anybody has a better way to word the commit message, I'll happily take it!