RESOLVED FIXED 169759
[Readable Streams API] Implement ReadableStreamBYOBRequest respond() (readable stream state)
https://bugs.webkit.org/show_bug.cgi?id=169759
Summary [Readable Streams API] Implement ReadableStreamBYOBRequest respond() (readabl...
Romain Bellessort
Reported 2017-03-16 09:59:38 PDT
Implement respond() in readable stream state
Attachments
Patch (16.20 KB, patch)
2017-03-16 10:36 PDT, Romain Bellessort
no flags
Archive of layout-test-results from ews117 for mac-elcapitan (368.92 KB, application/zip)
2017-03-16 11:37 PDT, Build Bot
no flags
Patch (16.87 KB, patch)
2017-03-17 03:15 PDT, Romain Bellessort
no flags
Patch (20.33 KB, patch)
2017-03-22 07:17 PDT, Romain Bellessort
no flags
Romain Bellessort
Comment 1 2017-03-16 10:36:19 PDT
Build Bot
Comment 2 2017-03-16 11:37:25 PDT
Comment on attachment 304655 [details] Patch Attachment 304655 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/3339459 Number of test failures exceeded the failure limit.
Build Bot
Comment 3 2017-03-16 11:37:28 PDT
Created attachment 304659 [details] Archive of layout-test-results from ews117 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Romain Bellessort
Comment 4 2017-03-17 03:15:03 PDT
youenn fablet
Comment 5 2017-03-17 08:35:13 PDT
Comment on attachment 304769 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304769&action=review > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:388 > + return srcBuffer.slice(srcByteOffset, srcByteOffset + srcLength); This implementation is not shielded. Also it should probably be implemented in JSC directly. There is already @structuredCloneArrayBuffer. Maybe we should group these together. > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:417 > + @readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); The function names are starting to be very long. Although it is good to match spec names, this hurts readability. Maybe we could start some shortening like: readableByteStreamControllerEnqueueChunkToQueue -> readableByteStreamControllerEnqueueChunk readableByteStreamControllerCommitPullIntoDescriptor -> readableByteStreamControllerCommitDescriptor readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue -> readableByteStreamControllerProcessPullDescriptors ... > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:450 > + @readableByteStreamControllerShiftPendingPullInto(controller); The naming seems not totally consistent here: readableByteStreamControllerShiftPendingPullInto readableByteStreamControllerCommitPullIntoDescriptor I would rename to something like readableByteStreamControllerShiftPendingDescriptor, readableByteStreamControllerCommitDescriptor > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:503 > +{ Group this function with the other, in a new or another file ideally.
Romain Bellessort
Comment 6 2017-03-22 07:17:37 PDT
WebKit Commit Bot
Comment 7 2017-03-22 11:07:53 PDT
Comment on attachment 305095 [details] Patch Clearing flags on attachment: 305095 Committed r214265: <http://trac.webkit.org/changeset/214265>
WebKit Commit Bot
Comment 8 2017-03-22 11:07:57 PDT
All reviewed patches have been landed. Closing bug.
Romain Bellessort
Comment 9 2017-03-23 02:00:38 PDT
(In reply to youenn fablet from comment #5) > Comment on attachment 304769 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=304769&action=review > > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:388 > > + return srcBuffer.slice(srcByteOffset, srcByteOffset + srcLength); > > This implementation is not shielded. > Also it should probably be implemented in JSC directly. > There is already @structuredCloneArrayBuffer. Maybe we should group these > together. Ok I will see how to group them together. > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:417 > > + @readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); > > The function names are starting to be very long. > Although it is good to match spec names, this hurts readability. > Maybe we could start some shortening like: > readableByteStreamControllerEnqueueChunkToQueue -> > readableByteStreamControllerEnqueueChunk > readableByteStreamControllerCommitPullIntoDescriptor -> > readableByteStreamControllerCommitDescriptor > readableByteStreamControllerProcessPullIntoDescriptorsUsingQueue -> > readableByteStreamControllerProcessPullDescriptors > ... > > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:450 > > + @readableByteStreamControllerShiftPendingPullInto(controller); > > The naming seems not totally consistent here: > readableByteStreamControllerShiftPendingPullInto > readableByteStreamControllerCommitPullIntoDescriptor > > I would rename to something like > readableByteStreamControllerShiftPendingDescriptor, > readableByteStreamControllerCommitDescriptor > I've updated these names as well as a few other (and I've added comments to indicate the name of corresponding operation in the spec). > > Source/WebCore/Modules/streams/ReadableByteStreamInternals.js:503 > > +{ > > Group this function with the other, in a new or another file ideally. As this function is called only once by the spec and simply copies data from one buffer to another (no need to detach/transfer/...), I've inlined it.
Note You need to log in before you can comment on or make changes to this bug.