v1.87.2.0 fix: preserve headed browsers during headless cleanup (#2874)

* fix(browse): isolate headless lifecycle from shared profiles

* test(cso): let Windows integration finish within subprocess budgets

* docs: format browser isolation release summary

* docs: update browser isolation documentation for v1.87.2.0

---------

Co-authored-by: garrytan <19957+garrytan@users.noreply.github.com>
This commit is contained in:
Garry Tanandgarrytan authored and GitHub committed 2026-09-15 20:16:07 +00:00
1 parent 6b09a582eb
commit 43c9e45ea7
10 files changed
+300 -23

No files matched your search

+6 -2
View File
@@ -1469,7 +1469,9 @@ function emergencyCleanup() {
// Clean Chromium profile locks via the shared helper (defensive guard
// refuses to operate on unrecognized profile dirs).
cleanSingletonLocks(resolveChromiumProfile());
if (activeBrowserManager.getConnectionMode() === 'headed' || process.env.BROWSE_HEADED === '1') {
cleanSingletonLocks(resolveChromiumProfile());
}
safeUnlinkQuiet(config.stateFile);
}
// Same import.meta.main gate as SIGINT/SIGTERM — embedders register their
@@ -1704,7 +1706,9 @@ export function buildFetchHandler(cfg: ServerConfig): ServerHandle {
await cfgBrowserManager.close();
cleanSingletonLocks(resolveChromiumProfile());
if (cfgBrowserManager.getConnectionMode() === 'headed') {
cleanSingletonLocks(resolveChromiumProfile());
}
safeUnlinkQuiet(config.stateFile);
process.exit(exitCode);
}