Bug 230219

Summary: Refactor WritableStream to better integrate https://streams.spec.whatwg.org/#create-writable-stream
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebCore Misc.Assignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, calvaris, ews-watchlist, joepeck, sihui_liu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing none

Description youenn fablet 2021-09-13 08:17:36 PDT
Refactor WritableStream to better integrate https://streams.spec.whatwg.org/#create-writable-stream
Comment 1 Radar WebKit Bug Importer 2021-09-13 08:23:40 PDT
<rdar://problem/83055758>
Comment 2 youenn fablet 2021-09-13 08:24:05 PDT
Created attachment 438041 [details]
Patch
Comment 3 Sihui Liu 2021-09-13 13:18:09 PDT
Comment on attachment 438041 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=438041&action=review

r=me, if all bots are green

> Source/WebCore/ChangeLog:9
> +        we were still going through the WritableStream constructor taking an underlying source.

underlying sink?

> Source/WebCore/Modules/streams/WritableStreamInternals.js:51
> +    const internalStream = { };

Do we want to Assert: ! IsNonNegativeNumber(highWaterMark) is true as spec?
Comment 4 youenn fablet 2021-09-14 06:54:41 PDT
Created attachment 438132 [details]
Patch for landing
Comment 5 youenn fablet 2021-09-14 06:55:26 PDT
Thanks for the review.

(In reply to Sihui Liu from comment #3)
> Comment on attachment 438041 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=438041&action=review
> 
> r=me, if all bots are green
> 
> > Source/WebCore/ChangeLog:9
> > +        we were still going through the WritableStream constructor taking an underlying source.
> 
> underlying sink?

Done.

> > Source/WebCore/Modules/streams/WritableStreamInternals.js:51
> > +    const internalStream = { };
> 
> Do we want to Assert: ! IsNonNegativeNumber(highWaterMark) is true as spec?

Added, I had to fix an actual bug in extractHWM.
Comment 6 EWS 2021-09-14 10:02:15 PDT
Committed r282395 (241656@main): <https://commits.webkit.org/241656@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 438132 [details].