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

feat(wasm): Adds a WASM integration #3080

Merged
merged 16 commits into from
Jan 18, 2021
Merged

feat(wasm): Adds a WASM integration #3080

merged 16 commits into from
Jan 18, 2021

Conversation

mitsuhiko
Copy link
Member

This adds WASM support in anticipation of getsentry/sentry#22264.

It's still missing tests as I was not actually sure how to approach this best.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 26, 2020

size-limit report

Path Size
@sentry/browser - CDN Bundle (gzipped) 19.99 KB (+0.01% 🔺)
@sentry/browser - Webpack 20.83 KB (0%)
@sentry/react - Webpack 20.83 KB (0%)
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 27.15 KB (+0.01% 🔺)

packages/wasm/LICENSE Outdated Show resolved Hide resolved
packages/wasm/package.json Outdated Show resolved Hide resolved
@kamilogorek kamilogorek merged commit 8ec4f3a into master Jan 18, 2021
@kamilogorek kamilogorek deleted the feature/wasm branch January 18, 2021 15:02
if (!frame.filename) {
return;
}
const match = frame.filename.match(/^(.*?):wasm-function\[\d+\]:(0x[a-fA-F0-9]+)$/);

Choose a reason for hiding this comment

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

On a recent chrome version, this match[1] corresponds to a wasm url schema, like wasm://wasm/0245f4e2. It seems chrome assigns some virtual URL to the binary, with some hash. But in the patch-web-assembly code, it uses the url from the fetch promise registerModule(..., response.url);, which is the actual url where I fetched the wasm binary from. So getImage never ends up finding a match.

I can file a separate issue if that's helpful, but I'm wondering if anyone knows where these wasm url schemes came from, and how we can match that hash up with the wasm binary we fetched + compiled?

Copy link

@bkotsopoulossc bkotsopoulossc Nov 30, 2021

Choose a reason for hiding this comment

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

Here's a simple open source example, but this doesn't seem limited to this package, it seems to effect most/all wasm binaries, at least on this version of chrome

http://nodeca.github.io/pica/demo/

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.

5 participants