You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move DWDS initialization into the onLoadEndCallback for the DDC library bundle format (#163338)
The existing code assumed that DWDS needed to initialize some of the JS
state between adding all the scripts to queue and when they are loaded.
A closer examination of the existing AMD module format bootstrapper
shows that we already only initialize DWDS' JS state after all the
scripts are loaded. This is because it waits for the entrypoint to be
loaded before initializing that state, and the entrypoint is only loaded
after all its dependencies are loaded, which includes the SDK and
transitively every file in the app.
Since it's simpler and avoids the double-gating to call main, this
change moves that initialization to after all the scripts are loaded and
aligns with the AMD module bootstrapper.
## Pre-launch Checklist
- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.
0 commit comments