RESOLVED FIXED 144907
[Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
https://bugs.webkit.org/show_bug.cgi?id=144907
Summary [Streams API] Delegate ReadableStreamReader reference counting to ReadableStream
youenn fablet
Reported 2015-05-12 02:35:36 PDT
The current implementation handles reader and stream as related but independent entities. This causes some complexity and some bugs to maintain their state and link correctly. It might be simpler to adapt the ReadableStreamController link for the reader.
Attachments
WIP (16.68 KB, patch)
2015-05-12 03:20 PDT, youenn fablet
no flags
Patch (17.74 KB, patch)
2015-05-12 06:06 PDT, youenn fablet
no flags
Patch (18.18 KB, patch)
2015-05-12 11:48 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2015-05-12 03:20:51 PDT
youenn fablet
Comment 2 2015-05-12 03:21:32 PDT
(In reply to comment #1) > Created attachment 252953 [details] > WIP WIP, does not contain moving closedpromise callback handling to ReadableStream, which would be the next logical step.
youenn fablet
Comment 3 2015-05-12 06:06:01 PDT
youenn fablet
Comment 4 2015-05-12 11:48:56 PDT
youenn fablet
Comment 5 2015-05-12 11:57:29 PDT
Comment on attachment 252973 [details] Patch This patch improves style over the previous patch. It shows the benefit of removing RefCounted from ReadableStreamReader. This removes code and at the end, there should be no need for a ReadableStreamReader.cpp, just like ReadableStreamController. There are two downsides though: - The ReadableStream will not be released until all readers, including released readers, are collected by the JS engine. - The ReadableStream currently needs to keep track of all released readers. Overall I think that this is an improvement, so r?
WebKit Commit Bot
Comment 6 2015-05-17 11:44:45 PDT
Comment on attachment 252973 [details] Patch Clearing flags on attachment: 252973 Committed r184444: <http://trac.webkit.org/changeset/184444>
WebKit Commit Bot
Comment 7 2015-05-17 11:44:49 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.