Repository navigation
[web] Fix deferred loading with wasm - #190140
Merged
Merged
Conversation
It seemed deferred loading via the recently added ([0]) `--enable-wasm-deferred-loading` never really worked. The embedder (flutter in this case) needs to invoke the callback function with either the wasm module bytes or a response object (which is a stream of bytes). Currently it invokes it with a promise of a response object which does not work atm. [0] flutter/flutter@80157ee
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces integration tests for deferred loading on the web (both with and without WebAssembly) and updates the entrypoint loader to resolve the fetch response before passing it to handleModule. Feedback suggests checking the fetch response status (response.ok) and throwing a descriptive error to avoid cryptic WebAssembly compilation errors when a module fails to load.
mkustermann
enabled auto-merge
July 28, 2026 19:36
mkustermann
dismissed stale reviews from harryterkelsen and biggs0125
via
July 29, 2026 07:49
482bfde
biggs0125
approved these changes
Jul 29, 2026
This was referenced Jul 29, 2026
auto-submit Bot
pushed a commit
to flutter/packages
that referenced
this pull request
Aug 8, 2026
…12393) Manual roll requested by [email protected] flutter/flutter@2a230d1...2757a77 2026-07-29 [email protected] Roll Skia from 3ae9e364d30b to 0f35bba4945c (2 revisions) (flutter/flutter#190215) 2026-07-29 [email protected] [web] Fix deferred loading with wasm (flutter/flutter#190140) 2026-07-29 [email protected] Roll Dart SDK from 1bbaacba6a5a to 43f7de5f4977 (1 revision) (flutter/flutter#190211) 2026-07-29 [email protected] Roll Skia from 119cae396625 to 3ae9e364d30b (6 revisions) (flutter/flutter#190208) 2026-07-29 [email protected] [Win32] Ignore mouse move events without capture when dragging (flutter/flutter#190029) 2026-07-29 [email protected] Roll Dart SDK from 49c637261348 to 1bbaacba6a5a (7 revisions) (flutter/flutter#190196) 2026-07-29 [email protected] Roll Skia from 30ad01017a46 to 119cae396625 (2 revisions) (flutter/flutter#190183) 2026-07-29 [email protected] Fix NestedScrollView example crash when switching tabs on desktop (flutter/flutter#186993) 2026-07-29 [email protected] Roll Fuchsia Linux SDK from OZkZC_2CZ_G5rbMIS... to J8rVTlBnjnUpuHYk3... (flutter/flutter#190174) 2026-07-29 [email protected] Update widget location tracking to use the new generalized api (flutter/flutter#189725) 2026-07-29 [email protected] Avoid unnecessary work in `BoxDecoration` and `RenderPhysicalModel` (flutter/flutter#187891) 2026-07-29 [email protected] Fix web context-menu client lifecycle in SelectableRegion (flutter/flutter#189587) 2026-07-29 [email protected] Roll Skia from 70733f74d415 to 30ad01017a46 (2 revisions) (flutter/flutter#190173) 2026-07-29 [email protected] Manual roll of Dart from 28e63ac22d8d to 49c637261348 (flutter/flutter#190158) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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.
It seemed deferred loading via the recently added ([0])
--enable-wasm-deferred-loadingnever really worked.The embedder (flutter in this case) needs to invoke the callback function with either the wasm module bytes or a response object (which is a stream of bytes).
Currently it invokes it with a promise of a response object which does not work atm.
[0] 80157ee