| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9ddd1a9 commit ea2df2a
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1662,9 +1662,14 @@ class PipeToReadableStreamReadRequest { | |||
| 1662 | 1662 | } | |
| 1663 | 1663 | ||
| 1664 | 1664 | [kChunk](chunk) { | |
| 1665 | - this.state.currentWrite = writableStreamDefaultWriterWrite(this.writer, chunk); | ||
| 1666 | - setPromiseHandled(this.state.currentWrite); | ||
| 1667 | - this.promise.resolve(false); | ||
| 1665 | + // Per spec, pipeTo must queue a microtask for the write to avoid | ||
| 1666 | + // synchronous write during enqueue(). See WHATWG Streams spec | ||
| 1667 | + // "ReadableStreamPipeTo" step 15's "chunk steps". | ||
| 1668 | + queueMicrotask(() => { | ||
| 1669 | + this.state.currentWrite = writableStreamDefaultWriterWrite(this.writer, chunk); | ||
| 1670 | + setPromiseHandled(this.state.currentWrite); | ||
| 1671 | + this.promise.resolve(false); | ||
| 1672 | + }); | ||
| 1668 | 1673 | } | |
| 1669 | 1674 | ||
| 1670 | 1675 | [kClose]() { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2,14 +2,6 @@ | |||
| 2 | 2 | "idlharness-shadowrealm.window.js": { | |
| 3 | 3 | "skip": "ShadowRealm support is not enabled" | |
| 4 | 4 | }, | |
| 5 | - "piping/general-addition.any.js": { | ||
| 6 | - "fail": { | ||
| 7 | - "note": "Blocked on https://github.com/whatwg/streams/issues/1243", | ||
| 8 | - "expected": [ | ||
| 9 | - "enqueue() must not synchronously call write algorithm" | ||
| 10 | - ] | ||
| 11 | - } | ||
| 12 | - }, | ||
| 13 | 5 | "queuing-strategies-size-function-per-global.window.js": { | |
| 14 | 6 | "skip": "Browser-specific test" | |
| 15 | 7 | }, | |
| Back | FazBrowse Home | New Git URL |
0 commit comments