Closed
Bug 1859853
Opened 2 years ago
Closed 1 year ago
WritableStream write timing doesn't match with Blink/WebKit if start function is async
Categories
(Core :: DOM: Streams, defect, P3)
Core
DOM: Streams
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: saschanaz, Unassigned)
References
()
Details
(Whiteboard: dom-lws-bugdash-triage)
new WritableStream({
async start() {},
async write(chunk) {
console.log(chunk)
}
}).getWriter().write('write');
Promise.resolve('promise').then(console.log)
Gecko: promise and then write
Blink/WebKit: write and then promise
But not sure why, shouldn't the write operation wait for start promise here?
| Reporter | ||
Updated•2 years ago
|
Flags: needinfo?(krosylight)
| Reporter | ||
Comment 1•2 years ago
|
||
Hmm.
WebKit: it just uses Promise.resolve() instead of "a promise resolved with" steps: https://searchfox.org/wubkat/rev/afcea26699c7f4b151758a203f76cd4fb5ef68fe/Source/WebCore/Modules/streams/WritableStreamInternals.js#596
Blink: Somehow start algorithms are made to always wrapped with Promise.resolve() which then is used directly with .then() on it.
So nobody is doing what the spec says. The reference implementation follows the Gecko behavior as expected.
(But I don't think the spec has a point, why make extra promise at all here?)
Flags: needinfo?(krosylight)
| Reporter | ||
Updated•2 years ago
|
Updated•2 years ago
|
Severity: -- → S3
Priority: -- → P3
| Reporter | ||
Comment 2•1 year ago
|
||
This is not our defect, closing while keeping the spec issue open.
| Reporter | ||
Updated•1 year ago
|
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → WONTFIX
| Reporter | ||
Updated•1 year ago
|
Whiteboard: dom-lws-bugdash-triage
You need to log in
before you can comment on or make changes to this bug.
Description
•