-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Conversation
size-limit report
|
e4005da
to
26f4b20
Compare
if (!frame.filename) { | ||
return; | ||
} | ||
const match = frame.filename.match(/^(.*?):wasm-function\[\d+\]:(0x[a-fA-F0-9]+)$/); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
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.