diff --git a/src/common/helper.ts b/src/common/helper.ts index 40c9ecd8c6d..215f182e4a8 100644 --- a/src/common/helper.ts +++ b/src/common/helper.ts @@ -360,15 +360,12 @@ async function getReadableFromProtocolStream( let eof = false; return new Readable({ - async read() { - // TODO: use the advised size parameter to read function once - // crbug.com/1290727 is resolved. - // Also, see https://github.com/puppeteer/puppeteer/pull/7868. + async read(size: number) { if (eof) { return null; } - const response = await client.send('IO.read', { handle }); + const response = await client.send('IO.read', { handle, size }); this.push(response.data, response.base64Encoded ? 'base64' : undefined); if (response.eof) { eof = true;