Skip to content

fix(worker-plugin): transfer OffscreenCanvas#2849

Merged
manucorporat merged 2 commits intostenciljs:masterfrom
arsenpellumbi:web-worker-OffscreenCanvas
Mar 25, 2021
Merged

fix(worker-plugin): transfer OffscreenCanvas#2849
manucorporat merged 2 commits intostenciljs:masterfrom
arsenpellumbi:web-worker-OffscreenCanvas

Conversation

@arsenpellumbi
Copy link
Copy Markdown
Contributor

Issue: #2848

@manucorporat
Copy link
Copy Markdown
Contributor

could we make it a small utility function? like const isTransferable?

@arsenpellumbi
Copy link
Copy Markdown
Contributor Author

could we make it a small utility function? like const isTransferable?

The problem is that the check is used in two separated contexts, one is in the "getWorkerIntro" which is attached to the worker, and the other is in the "WORKER_HELPERS" which is attached to the file that instantiates the worker.
One simple way is to create a string containing the function and attach it to both "getWorkerIntro" and "WORKER_HELPERS", but I don't see any benefit doing that.

@manucorporat
Copy link
Copy Markdown
Contributor

ah you right! merging i am actually thinking of using getTransferables in both contexts

@manucorporat manucorporat merged commit 969da47 into stenciljs:master Mar 25, 2021
johnjenkins pushed a commit to johnjenkins/stencil that referenced this pull request Apr 8, 2021
Co-authored-by: Arsen Pellumbi <apellumbi@screeningsolution.com>
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.

2 participants