Skip to content

[browser][CoreCLR] startup helpers cleanup#125429

Merged
pavelsavara merged 7 commits intodotnet:mainfrom
pavelsavara:startup_cleanup
Mar 12, 2026
Merged

[browser][CoreCLR] startup helpers cleanup#125429
pavelsavara merged 7 commits intodotnet:mainfrom
pavelsavara:startup_cleanup

Conversation

@pavelsavara
Copy link
Member

  • make the run method more readable by forEachResource and normalizeCollection helpers
  • callLibraryInitializerOnRuntimeConfigLoaded and callLibraryInitializerOnRuntimeReady in the assets.ts

…ollection helpers

- callLibraryInitializerOnRuntimeConfigLoaded and callLibraryInitializerOnRuntimeReady in the assets.ts
@pavelsavara pavelsavara added this to the 11.0.0 milestone Mar 11, 2026
@pavelsavara pavelsavara requested a review from ilonatommy March 11, 2026 09:04
@pavelsavara pavelsavara self-assigned this Mar 11, 2026
@pavelsavara pavelsavara added arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm labels Mar 11, 2026
Copilot AI review requested due to automatic review settings March 11, 2026 09:04
@pavelsavara pavelsavara changed the title [browser][CoreCLR] helper [browser][CoreCLR] startup helpers cleanup Mar 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the browser/CoreCLR JS loader bootstrap flow to improve readability by introducing helpers for iterating optional resource collections, and centralizes library-initializer invocation logic into assets.ts.

Changes:

  • Adds forEachResource / normalizeCollection helpers to simplify optional resource handling in createRuntime.
  • Moves onRuntimeConfigLoaded / onRuntimeReady library-initializer invocation into assets.ts.
  • Adjusts the runtime bootstrap sequence to use the new helpers and initializer functions.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
src/native/libs/Common/JavaScript/loader/run.ts Refactors runtime creation flow, introduces resource-iteration helpers, and rewires library initializer invocation.
src/native/libs/Common/JavaScript/loader/assets.ts Adds exported helpers to invoke library initializer hooks at config-loaded and runtime-ready phases.

Copilot AI review requested due to automatic review settings March 11, 2026 10:59
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

@pavelsavara pavelsavara marked this pull request as ready for review March 11, 2026 16:31
Copilot AI review requested due to automatic review settings March 11, 2026 16:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 12, 2026 07:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

@pavelsavara
Copy link
Member Author

/ba-g unrelated failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-Host os-browser Browser variant of arch-wasm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants