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 DrawingUtils constructor failing in Web Workers #5489

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bc-lee
Copy link

@bc-lee bc-lee commented Jun 19, 2024

Without this commit, the DrawingUtils constructor fails in Web Workers because the CanvasRenderingContext2D is not available in the worker context.
This commit adds a check whether the CanvasRenderingContext2D is defined before using it.

Fixes #5284

Without this commit, the DrawingUtils constructor fails in Web Workers
because the CanvasRenderingContext2D is not available in the worker
context.
This commit adds a check whether the CanvasRenderingContext2D is
defined before using it.

Fixes google-ai-edge#5284
@kuaashish
Copy link
Collaborator

Hi @mbrenon,

Could you please review this fix for the DrawingUtils constructor failing in Web Workers?

Thank you!!

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.

CanvasRenderingContext2D is not defined in DrawingUtils constructor
3 participants