[Fizz] Pass cancellation reason to abort (#27536)

This was implemented correctly for Flight but not Fizz. Hard to keep
these many wrappers in sync.
This commit is contained in:
Sebastian Markbåge
2023-10-17 21:43:12 -04:00
committed by GitHub
parent a419575077
commit e3748a0bde
5 changed files with 7 additions and 7 deletions

View File

@@ -80,7 +80,7 @@ function renderToReadableStream(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
@@ -161,7 +161,7 @@ function resume(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.

View File

@@ -70,7 +70,7 @@ function renderToReadableStream(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.

View File

@@ -80,7 +80,7 @@ function renderToReadableStream(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
@@ -161,7 +161,7 @@ function resume(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.

View File

@@ -64,7 +64,7 @@ function prerender(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.

View File

@@ -64,7 +64,7 @@ function prerender(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.