@@ -25,6 +25,7 @@ const {
2525
2626const {
2727 CountQueuingStrategy,
28+ ByteLengthQueuingStrategy,
2829} = require ( 'internal/webstreams/queuingstrategies' ) ;
2930
3031const {
@@ -417,11 +418,7 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj
417418 return new CountQueuingStrategy ( { highWaterMark } ) ;
418419 }
419420
420- // When not running in objectMode explicitly, we just fall
421- // back to a minimal strategy that just specifies the highWaterMark
422- // and no size algorithm. Using a ByteLengthQueuingStrategy here
423- // is unnecessary.
424- return { highWaterMark } ;
421+ return new ByteLengthQueuingStrategy ( { highWaterMark } ) ;
425422 } ;
426423
427424 const strategy = evaluateStrategyOrFallback ( options ?. strategy ) ;
@@ -457,12 +454,6 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj
457454 streamReadable . on ( 'data' , onData ) ;
458455
459456 return new ReadableStream ( {
460- // CGQAQ: we know that `Readable.readableHighWaterMark
461- // size is always in bytes, so we can use `bytes` here
462- // to make the `ReadableStream` a byte stream.
463- // Ref: https://streams.spec.whatwg.org/#high-water-mark:~:text=Concretely%2C%20a%20queuing,floating%2Dpoint%20units.
464- type : 'bytes' ,
465-
466457 start ( c ) { controller = c ; } ,
467458
468459 pull ( ) { streamReadable . resume ( ) ; } ,
0 commit comments