RESOLVED FIXED 160293
[Streams API] Improve ReadableStreamDefaultController.h/cpp
https://bugs.webkit.org/show_bug.cgi?id=160293
Summary [Streams API] Improve ReadableStreamDefaultController.h/cpp
Romain Bellessort
Reported 2016-07-28 07:10:13 PDT
Following renaming of ReadableStreamController into ReadableStreamDefaultController, a number of improvements have been suggested regarding JSReadableStreamDefaultController.h/cpp in https://bugs.webkit.org/show_bug.cgi?id=160242#c3
Attachments
Patch (6.77 KB, patch)
2016-09-23 06:12 PDT, Romain Bellessort
no flags
Patch (6.76 KB, patch)
2016-09-26 08:01 PDT, Romain Bellessort
no flags
Patch (6.74 KB, patch)
2016-09-27 07:22 PDT, Romain Bellessort
no flags
Patch (6.97 KB, patch)
2016-09-29 01:20 PDT, Romain Bellessort
no flags
Patch (7.08 KB, patch)
2016-09-29 03:15 PDT, Romain Bellessort
no flags
Romain Bellessort
Comment 1 2016-09-23 06:12:30 PDT
Romain Bellessort
Comment 2 2016-09-26 03:25:39 PDT
I made the different improvements suggested in above link. In addition, instead of having the helper jsController() to return a pointer, I made it return a reference so that there is no need to dereference it.
Romain Bellessort
Comment 3 2016-09-26 08:01:04 PDT
Romain Bellessort
Comment 4 2016-09-27 07:22:27 PDT
Romain Bellessort
Comment 5 2016-09-27 08:07:47 PDT
Comment on attachment 289941 [details] Patch Previous patch had an issue with an invalid ASSERT, which is now fixed. This ASSERT could be removed by updating the code generator (add a getter in order to return a JSFunction& after performing an assert).
youenn fablet
Comment 6 2016-09-28 08:16:45 PDT
Comment on attachment 289941 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=289941&action=review > Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp:74 > + auto& state = *globalObject.globalExec(); Can we add ASSERT(globalObject.globalExec())? Or add a globalExec() that returns a reference and does an ASSERT? It seems this is used in several places in these files.
Romain Bellessort
Comment 7 2016-09-29 01:20:28 PDT
Romain Bellessort
Comment 8 2016-09-29 03:15:45 PDT
Romain Bellessort
Comment 9 2016-09-29 05:25:48 PDT
(In reply to comment #6) > Comment on attachment 289941 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=289941&action=review > > > Source/WebCore/bindings/js/ReadableStreamDefaultController.cpp:74 > > + auto& state = *globalObject.globalExec(); > > Can we add ASSERT(globalObject.globalExec())? > Or add a globalExec() that returns a reference and does an ASSERT? > It seems this is used in several places in these files. I added a globalExec() helper in considered class. It performs an ASSERT and returns a reference.
WebKit Commit Bot
Comment 10 2016-09-29 05:50:38 PDT
Comment on attachment 290194 [details] Patch Clearing flags on attachment: 290194 Committed r206579: <http://trac.webkit.org/changeset/206579>
WebKit Commit Bot
Comment 11 2016-09-29 05:50:42 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.