Closed
Description
Version
v19.0.1
Platform
Linux x 6.0.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 03 Nov 2022 18:01:58 +0000 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
No response
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
No response
What do you see instead?
> structuredClone(process.env)
Uncaught:
DOMException [DataCloneError]: Cannot transfer object of unsupported type.
at new DOMException (node:internal/per_context/domexception:53:5)
at structuredClone (node:internal/structured_clone:23:17)
Additional information
No response
Activity
bnoordhuis commentedon Nov 12, 2022
I'm not sure this is fixable. If it is, it probably involves teaching
WriteHostObject()
in src/node_messaging.cc aboutprocess.env
through av8::ObjectTemplate::HasInstance()
check.The template is created in
CreateEnvVarProxy()
in src/node_env_var.cc. It should be stored on theEnvironment
soWriteHostObject()
can access it asenv_->env_proxy_template()
.MrJithil commentedon Nov 18, 2022
need help on this as its involved
c++
src: make structuredClone work for process.env
bnoordhuis commentedon Dec 1, 2022
#45698
src: make structuredClone work for process.env
src: make structuredClone work for process.env
src: make structuredClone work for process.env
src: make structuredClone work for process.env
src: make structuredClone work for process.env
src: make structuredClone work for process.env
src: make structuredClone work for process.env
4 remaining items