Skip to content
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

fix(ext/node): worker_threads copies env object #23536

Merged
merged 2 commits into from
Apr 24, 2024

Conversation

bartlomieju
Copy link
Member

@bartlomieju bartlomieju commented Apr 24, 2024

Most common argument to env option for worker_threads.Worker will be process.env.
In Deno process.env is a Proxy which can't be cloned using structured clone algorithm.
So to be safe, I'm creating a copy of actual object before it's sent to the worker thread.

Ref #23522

Copy link
Contributor

@marvinhagemeister marvinhagemeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and it works 👍

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bartlomieju bartlomieju enabled auto-merge (squash) April 24, 2024 16:08
@bartlomieju bartlomieju merged commit b424959 into denoland:main Apr 24, 2024
17 checks passed
@bartlomieju bartlomieju deleted the debug_parcel branch April 24, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants