Frontmatter
| id | 8804 |
| title | Harden Store.load against async destruction |
| state | Closed |
| labels | enhancementaicore |
| assignees | tobiu |
| createdAt | Jan 19, 2026, 11:58 AM |
| updatedAt | Jan 19, 2026, 12:01 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8804 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 19, 2026, 12:01 PM |
Harden Store.load against async destruction
tobiu assigned to @tobiu on Jan 19, 2026, 12:00 PM

tobiu
Jan 19, 2026, 12:01 PM
Input from Gemini 3 Pro:
✦ I have hardened
src/data/Store.mjsagainst async destruction.Changes:
- Updated
load()to useme.trap()aroundservice[fn](params),readFile, andNeo.Xhr.promiseJson.- Updated the
catchblock to re-throwNeo.isDestroyederrors, ensuring the global rejection handler suppresses them while preventing subsequent logic execution in the Store.This prevents errors when a Store is destroyed while a data load operation is pending.
tobiu closed this issue on Jan 19, 2026, 12:01 PM
Update
src/data/Store.mjsto usethis.trap()around asynchronous data fetching operations (RPC calls,Neo.Xhr, andfs.readFile).This ensures that if the Store is destroyed while a request is pending, the promise will be rejected with
Neo.isDestroyed(which is globally suppressed), preventing execution of subsequent logic likeme.data = ...on a destroyed instance.