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.
Created attachment 252953 [details] WIP
(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.
Created attachment 252958 [details] Patch
Created attachment 252973 [details] Patch
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?
Comment on attachment 252973 [details] Patch Clearing flags on attachment: 252973 Committed r184444: <http://trac.webkit.org/changeset/184444>
All reviewed patches have been landed. Closing bug.