RESOLVED FIXED 152505
[Streams API] In RS during enqueuing error should be reported only if readable
https://bugs.webkit.org/show_bug.cgi?id=152505
Summary [Streams API] In RS during enqueuing error should be reported only if readable
Xabier Rodríguez Calvar
Reported 2015-12-22 08:57:15 PST
[Streams API] In RS during enqueuing error should be reported only if readable
Attachments
Patch (1.63 KB, patch)
2015-12-22 08:59 PST, Xabier Rodríguez Calvar
no flags
Patch (6.95 KB, patch)
2015-12-23 05:17 PST, Xabier Rodríguez Calvar
no flags
Xabier Rodríguez Calvar
Comment 1 2015-12-22 08:59:42 PST
youenn fablet
Comment 2 2015-12-22 09:10:24 PST
Looks ok. I wonder why the patch does not contain any test modification. What about the tests added in https://github.com/whatwg/streams/commit/2e7f87e45806d58114592c923aed299798d10161?
Xabier Rodríguez Calvar
Comment 3 2015-12-22 09:39:45 PST
(In reply to comment #2) > Looks ok. > I wonder why the patch does not contain any test modification. > What about the tests added in > https://github.com/whatwg/streams/commit/ > 2e7f87e45806d58114592c923aed299798d10161? You're right, I saw them at that moment and I forget about them later.
Xabier Rodríguez Calvar
Comment 4 2015-12-23 05:17:14 PST
Created attachment 267836 [details] Patch Added tests
youenn fablet
Comment 5 2015-12-23 06:22:20 PST
Comment on attachment 267836 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=267836&action=review > LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.js:46 > +}, 'Readable stream: strategy.size errors the stream and then throws'); Are we not already passing this test without ReadableStreamInternals.js tests? > LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.js:71 > + assert_equals(error.name, 'RangeError', 'enqueue should throw a RangeError'); Are we not passing this test without the patch? The checks of this test may not be sufficient enough. It seems to me we should check that rs.getReader().closed be equal to theError.
Xabier Rodríguez Calvar
Comment 6 2015-12-23 07:05:55 PST
(In reply to comment #5) > > LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.js:46 > > +}, 'Readable stream: strategy.size errors the stream and then throws'); > > Are we not already passing this test without ReadableStreamInternals.js > tests? > > LayoutTests/imported/w3c/web-platform-tests/streams-api/readable-streams/bad-strategies.js:71 > > + assert_equals(error.name, 'RangeError', 'enqueue should throw a RangeError'); Both fail in debug because of the assert, but not in release.
youenn fablet
Comment 7 2015-12-23 07:47:39 PST
Comment on attachment 267836 [details] Patch r=me. It would be good to improve the second test: making it a promise test, expecting the error to be theError and not a RangeError, either here or as a pull request to whatwg streams github.
Xabier Rodríguez Calvar
Comment 8 2015-12-23 09:27:57 PST
(In reply to comment #7) > Comment on attachment 267836 [details] > Patch > > r=me. Landing. > It would be good to improve the second test: making it a promise test, > expecting the error to be theError and not a RangeError, either here or as a > pull request to whatwg streams github. I'll do it GitHub.
Xabier Rodríguez Calvar
Comment 9 2015-12-23 10:07:56 PST
(In reply to comment #8) > > It would be good to improve the second test: making it a promise test, > > expecting the error to be theError and not a RangeError, either here or as a > > pull request to whatwg streams github. > > I'll do it GitHub. https://github.com/whatwg/streams/pull/420
WebKit Commit Bot
Comment 10 2015-12-23 10:14:22 PST
Comment on attachment 267836 [details] Patch Clearing flags on attachment: 267836 Committed r194391: <http://trac.webkit.org/changeset/194391>
WebKit Commit Bot
Comment 11 2015-12-23 10:14:26 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.