RESOLVED FIXED 144869
[Streams API] ReadableStream reader should not be disposable when having pending promises
https://bugs.webkit.org/show_bug.cgi?id=144869
Summary [Streams API] ReadableStream reader should not be disposable when having pend...
youenn fablet
Reported 2015-05-11 06:31:09 PDT
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.
Attachments
Patch (7.52 KB, patch)
2015-05-11 12:23 PDT, youenn fablet
no flags
Patch for landing (7.51 KB, patch)
2015-05-11 23:20 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2015-05-11 12:23:49 PDT
Darin Adler
Comment 2 2015-05-11 17:21:49 PDT
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.
youenn fablet
Comment 3 2015-05-11 23:20:37 PDT
Created attachment 252942 [details] Patch for landing
WebKit Commit Bot
Comment 4 2015-05-12 00:17:04 PDT
Comment on attachment 252942 [details] Patch for landing Clearing flags on attachment: 252942 Committed r184159: <http://trac.webkit.org/changeset/184159>
WebKit Commit Bot
Comment 5 2015-05-12 00:17:09 PDT
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.