mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
fix: closing / aborting WritableStream is racy (#10982)
This commit is contained in:
parent
d7ce3adc8b
commit
ac431ca076
2 changed files with 14 additions and 14 deletions
|
@ -2808,7 +2808,7 @@
|
|||
function writableStreamHasOperationMarkedInFlight(stream) {
|
||||
if (
|
||||
stream[_inFlightWriteRequest] === undefined &&
|
||||
stream[_controller][_inFlightCloseRequest] === undefined
|
||||
stream[_inFlightCloseRequest] === undefined
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
@ -2857,11 +2857,11 @@
|
|||
assert(stream[_storedError] === undefined);
|
||||
assert(stream[_state] === "writable");
|
||||
const controller = stream[_controller];
|
||||
assert(controller);
|
||||
assert(controller !== undefined);
|
||||
stream[_state] = "erroring";
|
||||
stream[_storedError] = reason;
|
||||
const writer = stream[_writer];
|
||||
if (writer) {
|
||||
if (writer !== undefined) {
|
||||
writableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason);
|
||||
}
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue