-
Notifications
You must be signed in to change notification settings - Fork 37.7k
fix: associate extHost lifecycle to window #292672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR ties the Electron (main process) extension host utility process lifecycle to the owning window so that window reload/close reliably terminates long-running/blocked extension host processes, addressing #291346.
Changes:
- Bind extension host utility processes to the window lifecycle via
windowLifecycleBound: truein the Electron main extension host starter. - Add a new smoke test that blocks the extension host, reloads the window, and verifies the old extension host PID is terminated.
- Add a dedicated smoke test extension used by the new restart test and wire it into the smoke test runner.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/vs/platform/extensions/electron-main/extensionHostStarter.ts | Binds the extension host utility process lifecycle to the owning window so reload/close kills it. |
| test/smoke/src/main.ts | Copies the new smoke-test extension into the test extensions dir and registers the new restart suite. |
| test/smoke/src/areas/extensions/extension-host-restart.test.ts | Adds a smoke test that blocks the extension host, reloads the window, and asserts the old PID is gone. |
| test/smoke/extensions/vscode-smoketest-ext-host/package.json | Declares the new smoke-test extension that exposes a command used to block the extension host. |
| test/smoke/extensions/vscode-smoketest-ext-host/extension.js | Implements the command to record the extension host PID and block execution. |
83d242d to
367250d
Compare
alexdima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! I just left a comment about the graceful 5s behavior we used to have
…test.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
367250d to
e4fe4c7
Compare
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
|
Fixes #291346
With migration to render process reuse, our native-watchdog in the extension host cannot help with shutdown down of long running process on workbench reload. Instead we now rely on the main process to kill the extension host when the associated window is closed or reloaded.