[browser] Move .NET callbacks off Module - #134642
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
Azure Pipelines: Successfully started running 3 pipeline(s). 13 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
This was referenced Sep 25, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This was referenced Sep 29, 2026
Blazor (dotnet/aspnetcore) still passes onConfigLoaded, onDotnetReady and onDownloadResourceProgress inside the object handed to withModuleConfig. After moving those callbacks to loader-owned state they were silently dropped, which broke Blazor WASM startup. Add extractLegacyModuleCallbacks to both the CoreCLR and Mono loaders. It routes the three legacy callbacks into loaderCallbacks and returns a copy of the config without them, so nothing lands on Module. The helper is non-mutating and returns the input unchanged when no legacy callback is present (including when withModuleConfig is called with no argument). Also migrate the in-repo call sites (test-main.mjs, browser-advanced and browser-shutdown samples) to the new builder methods, so the shim only serves external callers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
maraf
marked this pull request as ready for review
October 1, 2026 08:13
pavelsavara
approved these changes
Oct 1, 2026
maraf
enabled auto-merge (squash)
October 1, 2026 08:53
This was referenced Oct 1, 2026
Open
Member
Author
|
/ba-g Failure is #135031 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move .NET lifecycle and download-progress callbacks out of Emscripten's
Moduleso the loader owns its own callback state.withConfigLoadedreplaces the legacy module configuration callback;withDotnetReadyremains available internally without becoming part of the public host-builder declaration.CoreCLR now accepts both function and array forms for
preInitandpreRun, avoiding the startup failure caused by spreading a function callback. Mono follows the same loader-owned callback model, and the browser test asset uses the new builder API.Follow up on #134498
Resolves #132555
Note
This PR description was generated with the assistance of GitHub Copilot.