Repository navigation
Mobile: keep the layout worker alive when a layout pass panics - #142
Open
katulevskiy wants to merge 3 commits into
Open
katulevskiy wants to merge 3 commits into
katulevskiy wants to merge 3 commits into
Conversation
The layout thread is the only publisher of frames. A panic in one pass killed it, so the transcript froze for the life of the view, and every later call silently sent into a dead channel. Run each pass under catch_unwind: on a panic the last good frame stays published, the row/height/width caches (possibly half-updated) are reset while keeping the user's open/folded state, and the next input gets a clean pass. This also covers a panicking platform listener callback. Also stop the UI-facing paths from panicking: recover poisoned mutexes through one `lock` helper (the guarded data is always replaced or read whole), and degrade instead of `expect` when the layout thread cannot be spawned, since the constructor cannot report an error across FFI. No exported interface changes; UniFFI bindings are unaffected.
Source: zeronsh#623 Source revision: 737f7f4
Contribution Managerneeds triage · medium risk · untriaged Open review workspace · Revision Next actions:
This summary is maintained by the review app. Decisions and test evidence are recorded in the workspace; the app does not merge PRs. |
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.
Upstream mirror
Source: zeronsh#623
Original author: @katulevskiy
Original revision:
737f7f480c1eebfcb13fc5fc93204959810687b2This PR is an isolated Contribution Manager pilot mirror. Its reviews, checks and merge state are separate from upstream. An empty
[skip ci]commit suppresses automatic bulk CI; the code tree matches the imported upstream revision.Summary
catch_unwind. On a panic the last good frame stays published, the row/height/width caches are reset (open and folded state is kept), and the next input gets a clean pass. This also covers a panicking platform listener callback.lockhelper that recovers from poison. Those mutexes are only held for anArcclone or swap, so poisoning is unlikely; this is cheap defence in depth.expecting, since the constructor can't return an error across FFI.mobilenor themobile-distprofile setspanic = "abort", so unwinding works in device builds.