(stream, state, chunk, encoding)
| 521 | } |
| 522 | |
| 523 | function readableAddChunkPushObjectMode(stream, state, chunk, encoding) { |
| 524 | if (chunk === null) { |
| 525 | state[kState] &= ~kReading; |
| 526 | onEofChunk(stream, state); |
| 527 | return false; |
| 528 | } |
| 529 | |
| 530 | if ((state[kState] & kEnded) !== 0) { |
| 531 | errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF()); |
| 532 | return false; |
| 533 | } |
| 534 | |
| 535 | if ((state[kState] & (kDestroyed | kErrored)) !== 0) { |
| 536 | return false; |
| 537 | } |
| 538 | |
| 539 | state[kState] &= ~kReading; |
| 540 | |
| 541 | if ((state[kState] & kDecoder) !== 0 && !encoding) { |
| 542 | chunk = state[kDecoderValue].write(chunk); |
| 543 | } |
| 544 | |
| 545 | addChunk(stream, state, chunk, false); |
| 546 | return canPushMore(state); |
| 547 | } |
| 548 | |
| 549 | function canPushMore(state) { |
| 550 | // We can push more data if we are below the highWaterMark. |
no test coverage detected
searching dependent graphs…