Repository navigation
fix(desktop): no destroyed-object error when quitting with browser tabs - #656
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Check guest and host lifetime before reading native browser state, and stop queued lifecycle synchronization after disposal. Carry-Group: incubator Carry-Observation: Browser preview teardown must tolerate native destruction before pending lifetime callbacks run.
411047f to
cb496e8
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Quitting with embedded browser tabs open could throw an uncaught
Object has been destroyederror fromrendererRenderingActiveinDesktopBrowserHost.ts, which delayed an update.Fix
All in
apps/desktop/src/preview/DesktopBrowserHost.ts:liveHostWebContentshelper returns the host only when neither the guest nor the host is destroyed. Everyguest.hostWebContentsread now goes through it.syncNativeLifetimeskips destroyed tabs. The queued lifecycle update now checks for destruction before it callsrenderingActive, avoiding another path to the same unsafe read.disposedflag, set in the scope finalizer, stopssyncNativeLifetime,scheduleNativeLifetimeand the queued tab and popup lifecycle updates once the host is torn down.Validation
DesktopBrowserHost.test.tsfailed before the fix. All 103 browser-host tests pass after it.Scope
No change to signing or Screen Recording behavior.
Local review: 2 rounds with claude-opus-5-5 (high) and gpt-6.1-terra (xhigh), approved.
Implemented with GPT-6.1 Sol (xhigh) through the Codex harness in T3 Code.