fix: associate extHost lifecycle to window#292672
Merged
deepak1556 merged 3 commits intomainfrom Feb 4, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
reviewed
Feb 4, 2026
alexdima
previously approved these changes
Feb 4, 2026
Member
alexdima
left a comment
There was a problem hiding this comment.
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:
|
chrmarti
approved these changes
Feb 4, 2026
joaomoreno
pushed a commit
that referenced
this pull request
Feb 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.