Currently, ReadableJSStream::Reader is disposed as soon as the JS scripts loose reference to it. Once disposed, the stream is released, which forbids resolving promises when the stream is changing, like going to close state. This happens even if the closed promise is actually set. The reader should be kept alive as long as there are pending promises to the reader and the stream can change of state.
Created attachment 252883 [details] Patch
Comment on attachment 252883 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252883&action=review > Source/WebCore/Modules/streams/ReadableStreamReader.cpp:80 > + RefPtr<ReadableStreamReader> protect(this); We should use Ref for this now, not RefPtr. > Source/WebCore/bindings/js/ReadableJSStream.cpp:182 > + Ref<Reader> reader = adoptRef(*new Reader(stream)); Extra space on this line.
Created attachment 252942 [details] Patch for landing
Comment on attachment 252942 [details] Patch for landing Clearing flags on attachment: 252942 Committed r184159: <http://trac.webkit.org/changeset/184159>
All reviewed patches have been landed. Closing bug.