@@ -86,7 +86,7 @@ const {
8686 kIsErrored,
8787 kIsReadable,
8888 kIsClosedPromise,
89- kControllerErrorFunction ,
89+ kControllerAbortFunction ,
9090} = require ( 'internal/streams/utils' ) ;
9191
9292const {
@@ -254,7 +254,7 @@ class ReadableStream {
254254 this [ kState ] = createReadableStreamState ( ) ;
255255
256256 this [ kIsClosedPromise ] = PromiseWithResolvers ( ) ;
257- this [ kControllerErrorFunction ] = ( ) => { } ;
257+ this [ kControllerAbortFunction ] = ( ) => { } ;
258258
259259 // The spec requires handling of the strategy first
260260 // here. Specifically, if getting the size and
@@ -2540,7 +2540,8 @@ function setupReadableStreamDefaultController(
25402540 stream,
25412541 } ;
25422542 stream [ kState ] . controller = controller ;
2543- stream [ kControllerErrorFunction ] = FunctionPrototypeBind ( controller . error , controller ) ;
2543+ stream [ kControllerAbortFunction ] =
2544+ ( error ) => readableStreamDefaultControllerError ( controller , error ) ;
25442545
25452546 const startResult = startAlgorithm ( ) ;
25462547
@@ -3364,6 +3365,8 @@ function setupReadableByteStreamController(
33643365 pendingPullIntos : [ ] ,
33653366 } ;
33663367 stream [ kState ] . controller = controller ;
3368+ stream [ kControllerAbortFunction ] =
3369+ ( error ) => readableByteStreamControllerError ( controller , error ) ;
33673370
33683371 const startResult = startAlgorithm ( ) ;
33693372
0 commit comments