[browser][wasm] Fix buffered symbol asset loading#127087
[browser][wasm] Fix buffered symbol asset loading#127087elringus wants to merge 1 commit intodotnet:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes buffered symbols runtime asset loading in the browser WASM loader, and adds a regression scenario in WBT to exercise supplying runtime assets via asset.buffer.
Changes:
- Adjusted asset instantiation flow to correctly handle
symbolsassets when provided viabuffer(and enabled buffered-response.text()decoding). - Added a
BufferedAssetsTestscenario toWasmBasicTestAppthat assignsbufferfor wasm/assemblies/pdbs/symbols duringonConfigLoaded. - Added a matching
ModuleConfigTests.BufferedAssetsTestpublish-and-run integration test.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/mono/wasm/testassets/WasmBasicTestApp/App/wwwroot/main.js | Adds the BufferedAssetsTest scenario that supplies runtime assets via asset.buffer. |
| src/mono/wasm/Wasm.Build.Tests/ModuleConfigTests.cs | Adds an integration test that publishes and runs the new scenario (with symbol map emission enabled). |
| src/mono/browser/runtime/loader/assets.ts | Fixes loader handling for buffered symbols assets and implements .text() for buffered-response shim. |
|
It seems the fingerprint stuff doesn't support file names with hashes. Is it somehow possible to generate the symbols file without the hash? Or maybe I should also patch the fingerprint resolver to ignore the hash on symbols?
|
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
This fixes
SymbolsAsset.bufferhandling in the browser runtime and adds a WBT regression test for buffered runtime assets:symbolsassets supplied viabufferare handled correctly, instead of effectively requiringpendingDownloadBufferedAssetsTesttoWasmBasicTestAppthat supplies these runtime assets viabuffer:dotnetwasmModuleConfigTests.BufferedAssetsTestintegration testThe issue was discussed with @pavelsavara on .NET's Discord server.
Note: I was not able to run the browser test end-to-end in the local environment due local WBT/workload packaging setup issues. If anything fails on CI, I’ll follow up and fix the remaining issues there.