Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request prevents crashes when a platform view is disposed mid-frame during composition by tracking missing views, omitting them from the DOM, removing them from the active composition, and printing a warning. A corresponding test case has been added to verify this behavior. Feedback suggests using a Set<int> instead of a List<int> for missingViewIds to optimize lookup efficiency in removeWhere.
mbcorona
force-pushed
the
fix-190017-platform-view-missing-clip-chain
branch
from
July 27, 2026 16:31
ebb490f to
0fab43a
Compare
mbcorona
enabled auto-merge
August 5, 2026 15:36
Contributor
|
autosubmit label was removed for flutter/flutter/190071, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label. |
This was referenced Aug 7, 2026
This was referenced Aug 10, 2026
This was referenced Sep 28, 2026
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.
Description
On Flutter Web,
PlatformViewEmbedder._getElementforce-unwrapped the clip chain for a platform view (_viewClipChains[viewId]!.root). If a view is disposed while still referenced by the frame being submitted (seen under memory pressure / hidden tab), the!threwNull check operator used on a null valueand crashed the frame.This change makes the composition tolerate a missing clip chain: the view is skipped instead of crashing, consistent with the existing invalid-view handling in
submitFrame. A regression test covers the dispose-mid-frame case.Note: the second crash reported in the issue (
_PlatformViewPlaceholderBox.performLayout) is already fixed on master, so this PR only addresses the engine crash.Fixes
Fixes #190017
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.