Summary: | [Streams API] Fix style issues | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Xabier Rodríguez Calvar <calvaris> | ||||||
Component: | New Bugs | Assignee: | Xabier Rodríguez Calvar <calvaris> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | benjamin, commit-queue, darin, youennf | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Xabier Rodríguez Calvar
2015-11-10 04:50:27 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
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. Created attachment 265175 [details]
Patch for landing
Comment on attachment 265175 [details] Patch for landing Clearing flags on attachment: 265175 Committed r192246: <http://trac.webkit.org/changeset/192246> All reviewed patches have been landed. Closing bug. |