(chunks)
| 618 | }, |
| 619 | |
| 620 | writev(chunks) { |
| 621 | if (!ArrayIsArray(chunks)) { |
| 622 | throw new ERR_INVALID_ARG_TYPE('chunks', 'Array', chunks); |
| 623 | } |
| 624 | if (!isWritable()) { |
| 625 | return PromiseReject(new ERR_STREAM_WRITE_AFTER_END()); |
| 626 | } |
| 627 | |
| 628 | if (backpressure === 'strict' && isFull()) { |
| 629 | return PromiseReject(new ERR_INVALID_STATE.RangeError( |
| 630 | 'Backpressure violation: buffer is full. ' + |
| 631 | 'Await each write() call to respect backpressure.')); |
| 632 | } |
| 633 | |
| 634 | if (backpressure === 'drop-newest' && isFull()) { |
| 635 | // Discard entire batch. |
| 636 | for (let i = 0; i < chunks.length; i++) { |
| 637 | totalBytes += |
| 638 | TypedArrayPrototypeGetByteLength(toUint8Array(chunks[i])); |
| 639 | } |
| 640 | return PromiseResolve(); |
| 641 | } |
| 642 | |
| 643 | let ok = true; |
| 644 | if (typeof writable.cork === 'function' && |
| 645 | typeof writable.uncork === 'function') { |
| 646 | writable.cork(); |
| 647 | try { |
| 648 | ok = writeChunks(chunks); |
| 649 | } finally { |
| 650 | writable.uncork(); |
| 651 | } |
| 652 | } else { |
| 653 | ok = writeChunks(chunks); |
| 654 | } |
| 655 | |
| 656 | if (ok) return PromiseResolve(); |
| 657 | |
| 658 | if (backpressure === 'block') { |
| 659 | return waitForDrain(); |
| 660 | } |
| 661 | |
| 662 | return PromiseResolve(); |
| 663 | }, |
| 664 | |
| 665 | endSync() { |
| 666 | return -1; |
nothing calls this directly
no test coverage detected
searching dependent graphs…