Bug 167786

Summary: [Readable Streams API] Implement ReadableByteStreamController enqueue()
Product: WebKit Reporter: Romain Bellessort <romain.wkt>
Component: WebCore Misc.Assignee: Romain Bellessort <romain.wkt>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, calvaris, commit-queue, youennf
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Romain Bellessort
Reported 2017-02-03 02:39:22 PST
Implement ReadableByteStreamController enqueue() method
Attachments
Patch (18.56 KB, patch)
2017-02-03 05:43 PST, Romain Bellessort
no flags
Patch (18.68 KB, patch)
2017-02-06 07:49 PST, Romain Bellessort
no flags
Romain Bellessort
Comment 1 2017-02-03 05:43:02 PST
Romain Bellessort
Comment 2 2017-02-03 08:37:47 PST
Proposed patch implements enqueue(), except regarding the step which declares that buffer should be transferred to current realm (step 7 in https://streams.spec.whatwg.org/#readable-byte-stream-controller-enqueue). I wasn't sure about what should be done there and I have isolated this in a dedicated function for a follow up patch. Conceptually, I understand the transfer operation, but I don't really get how it applies here: does it consist in making the buffer data accessible only to the ReadableStream module? (and not to the context calling enqueue())
youenn fablet
Comment 3 2017-02-05 22:23:55 PST
Comment on attachment 300525 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=300525&action=review > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:282 > + // For the moment, simply return received buffer. The goal is to enable transfer from one thread (worker) to another (main thread/window). I would guess there is already support in our codebase for that. > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:305 > + } Return early here. > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:309 > + @throwTypeError("ReadableByteStreamController enqueue operation has no support for BYOB reader"); Here as well.
Romain Bellessort
Comment 4 2017-02-06 07:49:02 PST
Romain Bellessort
Comment 5 2017-02-06 09:32:23 PST
(In reply to comment #3) > Comment on attachment 300525 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=300525&action=review > > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:282 > > + // For the moment, simply return received buffer. > > The goal is to enable transfer from one thread (worker) to another (main > thread/window). > I would guess there is already support in our codebase for that. Ok, I will further investigate the codebase then. > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:305 > > + } > > Return early here. > > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:309 > > + @throwTypeError("ReadableByteStreamController enqueue operation has no support for BYOB reader"); > > Here as well. Fixed in new patch.
WebKit Commit Bot
Comment 6 2017-02-07 01:01:41 PST
Comment on attachment 300722 [details] Patch Clearing flags on attachment: 300722 Committed r211779: <http://trac.webkit.org/changeset/211779>
WebKit Commit Bot
Comment 7 2017-02-07 01:01:44 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.