Implement ReadableByteStreamController enqueue() method
Created attachment 300525 [details] Patch
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())
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.
Created attachment 300722 [details] Patch
(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.
Comment on attachment 300722 [details] Patch Clearing flags on attachment: 300722 Committed r211779: <http://trac.webkit.org/changeset/211779>
All reviewed patches have been landed. Closing bug.