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
Created attachment 289679 [details] Patch
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.
Created attachment 289830 [details] Patch
Created attachment 289941 [details] Patch
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).
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.
Created attachment 290189 [details] Patch
Created attachment 290194 [details] Patch
(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.
Comment on attachment 290194 [details] Patch Clearing flags on attachment: 290194 Committed r206579: <http://trac.webkit.org/changeset/206579>
All reviewed patches have been landed. Closing bug.