This repository was archived by the owner on Feb 25, 2025. It is now read-only.
[platform_view] Remove the views from composition_order if they are being disposed #41371
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.
DisposeView happens every frame before laying out PlatformViews, with the order specified in
composition_order_. Becauseview_to_dispose_is determined on UI thread andcomposition_order_is determined on the platform thread, there could be a race if the dart code on the UI thread runs faster than the rasterizer on the Platform thread, causing a view inview_to_dispose_is still in thecomposition_order_.When this happens, we should delay the views in the
composition_order_being disposed and wait for the next frame to dispose them.fixes flutter/flutter#125223
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.