-
Notifications
You must be signed in to change notification settings - Fork 30.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
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! |
codebytere
pushed a commit
that referenced
this issue
Jun 18, 2020
Fixes: #33806 PR-URL: #33808 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
codebytere
pushed a commit
that referenced
this issue
Jun 30, 2020
Fixes: #33806 PR-URL: #33808 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
codebytere
pushed a commit
that referenced
this issue
Jul 10, 2020
Fixes: #33806 PR-URL: #33808 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
codebytere
pushed a commit
that referenced
this issue
Jul 14, 2020
Fixes: #33806 PR-URL: #33808 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
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: