Skip to content

Commit bb21faf

Browse files
authored
fix: disable firefox's webrender on Darwin (#5870)
References #5721
1 parent 9bd35d8 commit bb21faf

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

src/server/firefox/firefox.ts

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,21 @@ export class Firefox extends BrowserType {
4242
_amendEnvironment(env: Env, userDataDir: string, executable: string, browserArguments: string[]): Env {
4343
if (!path.isAbsolute(os.homedir()))
4444
throw new Error(`Cannot launch Firefox with relative home directory. Did you set ${os.platform() === 'win32' ? 'USERPROFILE' : 'HOME'} to a relative path?`);
45-
return os.platform() === 'linux' ? {
46-
...env,
47-
// On linux Juggler ships the libstdc++ it was linked against.
48-
LD_LIBRARY_PATH: `${path.dirname(executable)}:${process.env.LD_LIBRARY_PATH}`,
49-
// @see https://github.com/microsoft/playwright/issues/5721
50-
MOZ_WEBRENDER: 0,
51-
} : env;
45+
if (os.platform() === 'linux') {
46+
return {
47+
...env,
48+
// On linux Juggler ships the libstdc++ it was linked against.
49+
LD_LIBRARY_PATH: `${path.dirname(executable)}:${process.env.LD_LIBRARY_PATH}`,
50+
};
51+
}
52+
if (os.platform() === 'darwin') {
53+
return {
54+
...env,
55+
// @see https://github.com/microsoft/playwright/issues/5721
56+
MOZ_WEBRENDER: 0,
57+
};
58+
}
59+
return env;
5260
}
5361

5462
_attemptToGracefullyCloseBrowser(transport: ConnectionTransport): void {

0 commit comments

Comments
 (0)