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

ref: Avoid async in canvas #143

Merged
merged 2 commits into from
Dec 20, 2023
Merged

ref: Avoid async in canvas #143

merged 2 commits into from
Dec 20, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Dec 19, 2023

Related to #142, noticed that this is kind of unnecessary (and is transpiled in pre-ES2017 envs). Passing an async function to forEach is anyhow a bit weird I'd say.

@mydea mydea self-assigned this Dec 19, 2023
Copy link

github-actions bot commented Dec 19, 2023

size-limit report 📦

Path Size
rrweb - record only (gzipped) 16.57 KB (0%)
rrweb - record & getCanvasManager only (gzipped) 19.13 KB (+0.1% 🔺)
rrweb - record only (min) 56.53 KB (0%)
rrweb - record with treeshaking flags (gzipped) 15.35 KB (0%)

);
})
.catch(() => {
// noop
Copy link
Member

Choose a reason for hiding this comment

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

We should probably bubble this up to the error handler

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, looking at https://developer.mozilla.org/en-US/docs/Web/API/createImageBitmap it doesn't seem as if that should reject 🤔 I guess we can re-throw this in the callbackWrapper, to be sure 🤔

);
})
.catch((error) => {
callbackWrapper(() => {throw error});
Copy link
Member Author

Choose a reason for hiding this comment

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

@billyvg WDYT about this?

@mydea mydea merged commit f69cf86 into sentry-v2 Dec 20, 2023
14 checks passed
@mydea mydea deleted the fn/avoid-await branch December 20, 2023 10:47
mydea added a commit to getsentry/sentry-javascript that referenced this pull request Jan 10, 2024
This bump contains the following changes:

- fix(rrweb): Use unpatched requestAnimationFrame when possible
[#150](getsentry/rrweb#150)
- ref: Avoid async in canvas
[#143](getsentry/rrweb#143)
- feat: Bundle canvas worker manually
[#144](getsentry/rrweb#144)
- build: Build for ES2020
[#142](getsentry/rrweb#142)

Extracted out from
#9826

Closes #6946
billyvg pushed a commit that referenced this pull request Apr 26, 2024
Related to #142, noticed that
this is kind of unnecessary (and is transpiled in pre-ES2017 envs).
Passing an async function to forEach is anyhow a bit weird I'd say.
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.

None yet

2 participants