Repository navigation
fix(safearea): accept static lambdas in CreateWeakHandler debug assert (backport #1655) - #1686
Merged
Merged
Conversation
kazo0
enabled auto-merge (squash)
October 28, 2026 17:33
…t (backport #1655) - Cherry-picked from 9918d84 - Keeps the comment on why Debug is fully qualified: servicing/10.0 still builds native net*-android Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01PZQ75jvGWnf3XhqeenkJ9X
kazo0
force-pushed
the
dev/sb/20261027/backport-10.0
branch
from
October 28, 2026 17:33
aa7d6df to
7f60bf5
Compare
rajamatt
approved these changes
Oct 28, 2026
Xiaoy312
approved these changes
Oct 28, 2026
Merged
1 task done
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.
GitHub Issue (If applicable): backport of #1655 (regression from the #1602 fix, b2844ea)
PR Type
What is the current behavior?
In Debug builds, every app that loads a
SafeAreafails an assertion at startup. TheCreateWeakHandlerassert requiresDelegate.Target is null, but static lambdas compile to instance methods on the compiler's<>csingleton, so it fails for correct callers.What is the new behavior?
IsNonCapturing(Delegate)accepts targets with no instance fields, so static lambdas pass. Closures and delegates bound tothisstill fail the assert. The commit is cherry-picked from 9918d84.Conflict resolved
In
SafeArea.cs, I kept the comment explaining whySystem.Diagnostics.Debugis fully qualified. servicing/10.0 still builds nativenet*-android, where an unqualifiedDebugbinds toViewGroup.Debug(int). main dropped that comment after its Uno 7 Skia port.This PR first included #1679 as well. #1680 has since landed #1679 on servicing/10.0 with the same resolution, so this PR was rebased down to #1655.
Not backported
.githubtemplates (default branch only): chore: Update issue and PR templates for 7.0 #1663, chore: Add tvOS to the template platform lists #1672PR Checklist
Please check if your PR fulfills the following requirements:
Other information
The rebased branch is identical to the tree validated locally on macOS before the rebase (servicing/10.0 with #1679 resolved the same way as #1680, plus this commit):
Uno.Toolkit.WinUIbuilds fornet9.0-androidandnet9.0-ios(native) in Debug and Release with 0 errors, withTreatWarningsAsErrorsMaterialSampleAppbuilds fornet10.0-desktopin Release with 0 errorsWeakHandler_IsNonCapturing. The one failure,FlexPanelTests.When_UseLayoutRoundingTrue_ThenArrangeSnapsToPixelGrid, also fails on unmodified servicing/10.0 on this Mac. It expects 34.0 but gets 33.5 at the display's 2× scale, so it depends on the machine and not on this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01PZQ75jvGWnf3XhqeenkJ9X