-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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 module doesn't handle undefined/NaN/null correctly #14660
Comments
(I discovered it when debugging jsdom/jsdom#1932, which turns out to be primarily a bug on jsdom's side. I'm okay with closing this, but still keeping this open to see what anyone else thinks.) |
I suspect this is a V8 bug that has since been fixed because I can't reproduce with today's master; I can with the v8.x branch. |
@bnoordhuis In master the first case returns |
Sorry yes, I was referring to the first case. The second one is a bug in the vm module, not V8. (Or bug... it makes perfect sense in the proxy-to-another-object model, but it's different from a native context.) |
As of f1d6b04, it looks like this behavior has changed a little bit:
|
I'm going to call this one of the things that one has to take care of when trying to use the |
undefined
(andNaN
andInfinity
) is defined as unwritable, unconfigurable, unenumerable properties on the global object, and thus IMO should not be overridable through the VM module.It is unclear if #13265 fixes this, probably not though as this issue concerns getting the value.
The text was updated successfully, but these errors were encountered: