-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
VM aborts when error thrown when in property setter #33806
Labels
Comments
addaleax
changed the title
Repl aborts when error thrown when in property setter
VM aborts when error thrown when in property setter
Jun 9, 2020
addaleax
added
confirmed-bug
Issues with confirmed bugs.
vm
Issues and PRs related to the vm subsystem.
labels
Jun 9, 2020
Minimal reproduction: const vm = require('vm');
const ctx = vm.createContext();
Object.defineProperty(ctx, 'db', {
set: (val) => {
throw new Error('test error');
}
});
vm.runInContext('db = 42', ctx); |
Also confirmed to be a problem in 14.3 and master (not only 12.x) |
If #33808 lands, would it be possible to backport the fix over to a 12.x? Or would it only go in the latest? |
@lrlna it should be able to be backported |
@devsnek yay, thanks! |
This was referenced May 22, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
The error that is thrown should be reported in the default eval function, and it should be catchable.
What do you see instead?
Additional information
We need to be able to throw an error if a user tries to assign a context value to a disallowed type.
The text was updated successfully, but these errors were encountered: