RESOLVED FIXED 151089
[Streams API] Fix style issues
https://bugs.webkit.org/show_bug.cgi?id=151089
Summary [Streams API] Fix style issues
Xabier Rodríguez Calvar
Reported 2015-11-10 04:50:27 PST
[Streams API] Fix style issues
Attachments
Patch (19.76 KB, patch)
2015-11-10 04:52 PST, Xabier Rodríguez Calvar
no flags
Patch for landing (19.56 KB, patch)
2015-11-10 06:47 PST, Xabier Rodríguez Calvar
no flags
Xabier Rodríguez Calvar
Comment 1 2015-11-10 04:52:24 PST
Created attachment 265167 [details] Patch Inlined some things, var -> const and let, removed some undefined parameters and returns, added missing use strict and other minor changes
youenn fablet
Comment 2 2015-11-10 05:39:30 PST
Comment on attachment 265167 [details] Patch Nice clean-up. Use of bind() may not be safe. Would you be able to land the patch without the bind changes. Doing a quick check, bind seems already in use in WritableStream. A follow-up should fix that. View in context: https://bugs.webkit.org/attachment.cgi?id=265167&action=review > Source/WebCore/Modules/streams/ReadableStream.js:58 > + @Promise.prototype.@then.@call(@Promise.@resolve(@invokeOrNoop(underlyingSource, "start", [this.@controller])), function() { This line is rather hard to parse. I would keep it as two different lines. > Source/WebCore/Modules/streams/ReadableStreamInternals.js:243 > + @Promise.prototype.@then.@call(@promiseInvokeOrNoop(stream.@underlyingSource, "pull", [stream.@controller]), function() { Ditto. > Source/WebCore/Modules/streams/WritableStreamInternals.js:112 > + @errorWritableStream.bind(stream) Using bind may not be safe. What if someone does Function.prototype.bind = evilFunction? I would remove the change from this patch. As a later patch and if that is worth it, @bind may be added and this change may be done. > Source/WebCore/Modules/streams/WritableStreamInternals.js:129 > + @errorWritableStream.bind(stream) Ditto.
Xabier Rodríguez Calvar
Comment 3 2015-11-10 06:47:20 PST
Created attachment 265175 [details] Patch for landing
WebKit Commit Bot
Comment 4 2015-11-10 07:45:21 PST
Comment on attachment 265175 [details] Patch for landing Clearing flags on attachment: 265175 Committed r192246: <http://trac.webkit.org/changeset/192246>
WebKit Commit Bot
Comment 5 2015-11-10 07:45:25 PST
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.