Files
gstack/patches/playwright-core@1.62.1.patch

37 lines
2.0 KiB
Diff

diff --git a/lib/coreBundle.js b/lib/coreBundle.js
index d9041dd0f009072511a7d808dec83121ff29e127..542acd31dd7e8ae084de952dc42ec63d0caba849 100644
--- a/lib/coreBundle.js
+++ b/lib/coreBundle.js
@@ -8906,6 +8906,10 @@ async function launchProcess(options) {
env: options.env,
cwd: options.cwd,
shell: options.shell,
+ // gstack patch (#2160/#1989): Node defaults windowsHide to false for
+ // child_process.spawn, so browser children could flash a console window
+ // on Windows. Playwright never needs the child's window shown.
+ windowsHide: true,
stdio
};
const spawnedProcess = childProcess.spawn(options.command, options.args || [], spawnOptions);
@@ -8985,7 +8989,7 @@ async function launchProcess(options) {
options.log(`[pid=${spawnedProcess.pid}] <will force kill>`);
try {
if (process.platform === "win32") {
- const taskkillProcess = childProcess.spawnSync(`taskkill /pid ${spawnedProcess.pid} /T /F`, { shell: true });
+ const taskkillProcess = childProcess.spawnSync(`taskkill /pid ${spawnedProcess.pid} /T /F`, { shell: true, windowsHide: true });
const [stdout2, stderr2] = [taskkillProcess.stdout.toString(), taskkillProcess.stderr.toString()];
if (stdout2)
options.log(`[pid=${spawnedProcess.pid}] taskkill stdout: ${stdout2}`);
@@ -34634,7 +34638,10 @@ var init_chromiumSwitches = __esm({
// Disables forced sign-in in Edge.
"msForceBrowserSignIn",
// Disables updating the preferred version in LaunchServices preferences on mac.
- "msEdgeUpdateLaunchServicesPreferredVersion"
+ "msEdgeUpdateLaunchServicesPreferredVersion",
+ // gstack patch: backport of microsoft/playwright#43605 (1.65). Random client ports fail with
+ // net::ERR_NO_BUFFER_SPACE (WSAENOBUFS) on Windows even when ports are free (crbug.com/572515601).
+ "TcpPortRandomizationWin"
].filter(Boolean);
chromiumSwitches = (options) => [
"--disable-field-trial-config",