Protect restored Settings categories from disposed owner writes
This commit is contained in:
@@ -19,3 +19,17 @@ write ordering. Existing retained-page draft/scroll tests also pass. Analyzer
|
||||
clean (`flutter-analyze.q5b4VU`). Manager owns the full-app integration wiring,
|
||||
rendered tab-switch/relaunch capture and delivery. No deployment, server
|
||||
restart or device testing was performed in this lane.
|
||||
|
||||
Replacement ownership is also guarded: a disposed widget or changed scope skips
|
||||
queued saves before they start, and the production store rechecks its owner
|
||||
inside the shared per-key storage queue. A replacement Settings page reads after
|
||||
any already-started write from the previous owner, then saves its newer choice
|
||||
last. The queue is shared with tab-location persistence through
|
||||
`core/storage/ordered_local_storage.dart` (companion prerequisite `f6e1ede6`).
|
||||
|
||||
The follow-up passed 27 tests including the shared queue tests
|
||||
(`/tmp/memwatch/out.a86IS6`) and clean analysis (`2CMlDH`). The new recreation
|
||||
regression blocks old choice A, queues old choice B, disposes the widget,
|
||||
chooses C in its replacement, then releases A: B never writes and C remains
|
||||
selected/persisted. A production-store test also verifies reads wait for pending
|
||||
writes and an invalidated queued save is skipped inside the operation.
|
||||
|
||||
Reference in New Issue
Block a user