-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(wasm): initialised sentryWasmImages for webworkers #18812
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
base: develop
Are you sure you want to change the base?
feat(wasm): initialised sentryWasmImages for webworkers #18812
Conversation
|
Thanks for the contribution @harshit078. Are you done working on this or are you done (asking since it's a draft). |
|
Hey @andreiborza , yes I have finished working on this PR and converted it to review. |
|
working on comments addressed by cursor ! |
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
dev-packages/browser-integration-tests/suites/wasm/webWorker/test.ts
Outdated
Show resolved
Hide resolved
dev-packages/browser-integration-tests/suites/wasm/webWorker/assets/worker.js
Fixed
Show fixed
Hide fixed
| } | ||
|
|
||
| try { | ||
| const { instance } = await WebAssembly.instantiateStreaming(fetch(wasmUrl), { |
Check warning
Code scanning / CodeQL
Client-side request forgery Medium
URL
user-provided value
|
Hey @andreiborza , the PR is ready to review. |
|
@harshit078 awesome, thanks! I'll take a look. |
| /** | ||
| * Registers a WASM module and forwards its debug image to the parent thread. | ||
| */ | ||
| function registerModuleAndForward( |
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.
m: I think we should call registerModule form registry.ts in here, that way we get some deduplication going when needed. It'll also get rid of this almost identical code duplication.
We'll need to adapt registerModule to return the image so we can post it in this method.
| @@ -0,0 +1,86 @@ | |||
| // This worker manually just replicates what the actual Sentry.registerWebWorkerWasm() does | |||
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.
m: Could we highlight in the comment why we are doing that as opposed to actually using Sentry. registerWebWorkerWasm() please?
|
@harshit078 thanks again. Just had a look, looks mostly fine to me. Just a minor comment around code duplication. |
Before submitting a pull request, please take a look at our
Contributing guidelines and verify:
yarn lint) & (yarn test).Closes #18779