Skip to content

Fix CEF zombie processes on full app close and restart#2

Open
senamakel-droid wants to merge 8 commits into
mainfrom
fix-cef-zombie-processes-11257383111442119267
Open

Fix CEF zombie processes on full app close and restart#2
senamakel-droid wants to merge 8 commits into
mainfrom
fix-cef-zombie-processes-11257383111442119267

Conversation

@senamakel-droid

@senamakel-droid senamakel-droid commented May 3, 2026

Copy link
Copy Markdown
Owner

Fix CEF zombie processes on full app close and restart

Extracts the early teardown logic into perform_early_teardown_sync and perform_early_teardown_async helpers, which ensure that child webviews, CDP tasks, and WebSockets are terminated before cef::shutdown() runs.
Previously, this only executed on RunEvent::ExitRequested. Now, it also runs on tray quit (shutdown_app_sync), restart_app, and app update restarts, preventing orphaned helper processes.


PR created automatically by Jules for task 11257383111442119267 started by @senamakel-droid


Note

Medium Risk
Changes app shutdown/restart sequencing (CEF/webview/core teardown) across multiple exit paths; mistakes could cause hangs, lost state, or failure to restart cleanly.

Overview
Ensures the same early teardown sequence runs before any app restart/exit, not just RunEvent::ExitRequested, to reduce orphaned CEF helper processes.

This extracts the cleanup steps into shared perform_early_teardown_sync/perform_early_teardown_async helpers and wires them into restart_app, app-update restarts (apply_app_update/install_app_update), and tray-menu Quit via a new shutdown_app_sync wrapper (replacing direct app.exit(0)).

Also bumps the openhuman crate version in Cargo.lock from 0.53.11 to 0.53.12.

Reviewed by Cursor Bugbot for commit 5e81ca1. Bugbot is set up for automated code reviews on this repo. Configure here.

senamakel and others added 6 commits May 3, 2026 10:50
…nsai#1116)

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Steven Enamakel <senamakel@users.noreply.github.com>
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: senamakel-droid <281415773+senamakel-droid@users.noreply.github.com>
Extracts the early teardown logic into `perform_early_teardown_sync` and `perform_early_teardown_async` helpers, which ensure that child webviews, CDP tasks, and WebSockets are terminated before `cef::shutdown()` runs.
Previously, this only executed on `RunEvent::ExitRequested`. Now, it also runs on tray quit (`shutdown_app_sync`), `restart_app`, and app update restarts, preventing orphaned helper processes.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

senamakel added 2 commits May 3, 2026 12:51
shutdown_app_sync is called from tray quit and restart paths, so the
allow attribute was incorrect after those call sites were wired up.
@cursor

cursor Bot commented May 3, 2026

Copy link
Copy Markdown

You have used all of your free Bugbot PR reviews.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants