зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1734208 - [remote] Ignore stdout in Puppeteer if dumpio isn't used. r=webdriver-reviewers,jdescottes
When the browser child process has logging enabled and output on stdout isn't constantly processed, the browser process is about to freeze. To avoid such a situation at least the stdout pipe shouldn't be set by default but only if dumpio is enabled. Differential Revision: https://phabricator.services.mozilla.com/D127883
This commit is contained in:
Родитель
2a48956de7
Коммит
a2602f840c
|
@ -64,10 +64,13 @@ export class BrowserRunner {
|
|||
start(options: LaunchOptions): void {
|
||||
const { handleSIGINT, handleSIGTERM, handleSIGHUP, dumpio, env, pipe } =
|
||||
options;
|
||||
let stdio: Array<'ignore' | 'pipe'> = ['pipe', 'pipe', 'pipe'];
|
||||
let stdio: Array<'ignore' | 'pipe'>;
|
||||
if (pipe) {
|
||||
if (dumpio) stdio = ['ignore', 'pipe', 'pipe', 'pipe', 'pipe'];
|
||||
else stdio = ['ignore', 'ignore', 'ignore', 'pipe', 'pipe'];
|
||||
} else {
|
||||
if (dumpio) stdio = ['pipe', 'pipe', 'pipe'];
|
||||
else stdio = ['pipe', 'ignore', 'pipe'];
|
||||
}
|
||||
assert(!this.proc, 'This process has previously been started.');
|
||||
debugLauncher(
|
||||
|
|
Загрузка…
Ссылка в новой задаче