| 161 | let newStreamsToUint8Array; |
| 162 | let newStreamsConvertChunks; |
| 163 | function lazyNewStreams() { |
| 164 | if (newStreamsPull === undefined) { |
| 165 | const pullModule = require('internal/streams/iter/pull'); |
| 166 | newStreamsPull = pullModule.pull; |
| 167 | newStreamsPullSync = pullModule.pullSync; |
| 168 | const utils = require('internal/streams/iter/utils'); |
| 169 | newStreamsParsePullArgs = utils.parsePullArgs; |
| 170 | newStreamsToUint8Array = utils.toUint8Array; |
| 171 | newStreamsConvertChunks = utils.convertChunks; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | // By the time the C++ land creates an error for a promise rejection (likely from a |
| 176 | // libuv callback), there is already no JS frames on the stack. So we need to |