-
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
Node.js structuredClone
objects do not preserve prototypes
#54603
Comments
structuredClone
objects do not preverse prototypesstructuredClone
objects do not preserve prototypes
CC @nodejs/web-standards |
the code snippet from above logs |
Interesting. I'll see if I can narrow down a specific commit. The issue starts with v22.0.0. @nodejs/v8 does this have something to do with V8? I can't reproduce in Chrome. |
It's probably caused by #50107 |
CC @H4ad |
PR-URL: #55067 Fixes: #54603 Refs: #50107 Reviewed-By: Mattias Buelens <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#55067 Fixes: nodejs#54603 Refs: nodejs#50107 Reviewed-By: Mattias Buelens <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
When using
structuredClone
with and transferring the original in Node.js, the resulting clone's prototype is not the same as the original's. However, in other environments, the prototype remains consistent.In Node.js, the above snippet logs
false
, however, in other environments, it logstrue
.The text was updated successfully, but these errors were encountered: