Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

fix(firefox): force fast shutdown after "xpcom-will-shutdown" phase (#18556)

Dmitry Gozman7a9f1b5ee407
diff --git a/packages/playwright-core/src/server/firefox/firefox.ts b/packages/playwright-core/src/server/firefox/firefox.ts
index 8c31746813..2312619e62 100644
--- a/packages/playwright-core/src/server/firefox/firefox.ts
+++ b/packages/playwright-core/src/server/firefox/firefox.ts
@@ -93,6 +93,10 @@ export class Firefox extends BrowserType {
// Prefs for quick fixes that didn't make it to the build.
// Should all be moved to `playwright.cfg`.
const kBandaidFirefoxUserPrefs = {
+ // Avoid stalling on shutdown, after "xpcom-will-shutdown" phase.
+ // This at least happens when shutting down soon after launching.
+ // See AppShutdown.cpp for more details on shutdown phases.
+ 'toolkit.shutdown.fastShutdownStage': 3,
};
const kDisableFissionFirefoxUserPrefs = {