RESOLVED FIXED 143130
[Streams API] Split ReadableStream/Reader implementation according source type (JS vs native)
https://bugs.webkit.org/show_bug.cgi?id=143130
Summary [Streams API] Split ReadableStream/Reader implementation according source typ...
youenn fablet
Reported 2015-03-27 04:30:38 PDT
It may be cleaner to wrap all JS source specific handling (errors in particular) in separate classes from the core ReadableStream/ReadableStreamReader classes.
Attachments
Patch (12.17 KB, patch)
2015-03-27 07:53 PDT, youenn fablet
no flags
Patch (11.81 KB, patch)
2015-03-31 04:11 PDT, youenn fablet
no flags
Fixed memory leak (11.86 KB, patch)
2015-04-02 05:25 PDT, youenn fablet
no flags
Patch for landing (11.86 KB, patch)
2015-04-03 00:14 PDT, youenn fablet
no flags
Patch for landing (11.86 KB, patch)
2015-04-03 00:15 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2015-03-27 07:53:29 PDT
youenn fablet
Comment 2 2015-03-31 04:11:09 PDT
youenn fablet
Comment 3 2015-04-02 05:25:42 PDT
Created attachment 249971 [details] Fixed memory leak
Benjamin Poulain
Comment 4 2015-04-02 16:02:26 PDT
Comment on attachment 249971 [details] Fixed memory leak View in context: https://bugs.webkit.org/attachment.cgi?id=249971&action=review I am quite surprised you specialize the reader, I was expecting a subclass only for ReadableStream. I guess ReadableJSStream and ReadableJSStreamReader will grow right? I would give them their own header. r=me in any case, no problem with this patch. > Source/WebCore/ChangeLog:16 > + (WebCore::ReadableStream::ReadableStream): Moved suspendIfNeeded inside constructor to ese subclassing. Typo: ese > Source/WebCore/bindings/js/ReadableStreamJSSource.h:65 > + Useless blank line here.
youenn fablet
Comment 5 2015-04-03 00:12:54 PDT
Thanks for the review. (In reply to comment #4) > Comment on attachment 249971 [details] > Fixed memory leak > > View in context: > https://bugs.webkit.org/attachment.cgi?id=249971&action=review > > I am quite surprised you specialize the reader, I was expecting a subclass > only for ReadableStream. ReadableJSStreamReader sole purpose is to store JS errors as a JSC::Strong. ReadableStream does also the chunk queue management. > I guess ReadableJSStream and ReadableJSStreamReader will grow right? I would > give them their own header. Yes, maybe we could move ReadableJSStream and ReadableJSStreamReader to a different file. I would keep both classes together, ReadableJSStreamReader taking only 15 lines with the error storage code. > > r=me in any case, no problem with this patch. Great! > > Source/WebCore/ChangeLog:16 > > + (WebCore::ReadableStream::ReadableStream): Moved suspendIfNeeded inside constructor to ese subclassing. > > Typo: ese OK > > > Source/WebCore/bindings/js/ReadableStreamJSSource.h:65 > > + > > Useless blank line here. OK
youenn fablet
Comment 6 2015-04-03 00:14:33 PDT
Created attachment 250049 [details] Patch for landing
youenn fablet
Comment 7 2015-04-03 00:15:43 PDT
Created attachment 250050 [details] Patch for landing
WebKit Commit Bot
Comment 8 2015-04-03 01:08:25 PDT
Comment on attachment 250050 [details] Patch for landing Clearing flags on attachment: 250050 Committed r182309: <http://trac.webkit.org/changeset/182309>
WebKit Commit Bot
Comment 9 2015-04-03 01:08:31 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.