Support ReadableByteStreamController in stream piping#36497
Support ReadableByteStreamController in stream piping#36497Taym95 wants to merge 2 commits intoservo:mainfrom
Conversation
|
🔨 Triggering try run (#14428902729) for Linux (WPT) |
191aa13 to
e7f463c
Compare
|
|
e7f463c to
b4ec9cd
Compare
|
🔨 Triggering try run (#14428998306) for Linux (WPT) |
b4ec9cd to
692c7fa
Compare
|
Test results for linux-wpt from try job (#14428998306): Flaky unexpected result (19)
Stable unexpected results that are known to be intermittent (14)
|
|
✨ Try run (#14428998306) succeeded. |
gterzian
left a comment
There was a problem hiding this comment.
Thanks for this.
I think it's a good idea to add a simple test for this in https://github.com/servo/servo/tree/d46a17a487ce7799fc3d1e60fa093c628e62869a/tests/wpt/mozilla/tests/mozilla
| pub(crate) fn read(&self, can_gc: CanGc) -> Rc<Promise> { | ||
| match self { | ||
| ReaderType::BYOB(_) => { | ||
| unreachable!("Native reading of a chunk can only be done with a default reader.") |
There was a problem hiding this comment.
this is what read_a_chuk does, byob read function requires a view.
There was a problem hiding this comment.
What I mean is that here, unlike at read_a_chunk, the point is to actually use a BYOB reader for the native reading of chunk as part of the piping flow. And doing so will hit this branch of logic, and panic. Is my understanding correct?
Signed-off-by: Taym Haddadi <[email protected]>
692c7fa to
4ed54ee
Compare
Signed-off-by: Taym Haddadi <[email protected]>
|
🔨 Triggering try run (#14479051535) for Linux (WPT) |
Added test. |
|
Test results for linux-wpt from try job (#14479051535): Flaky unexpected result (22)
Stable unexpected results that are known to be intermittent (14)
|
|
✨ Try run (#14479051535) succeeded. |
| pub(crate) fn read(&self, can_gc: CanGc) -> Rc<Promise> { | ||
| match self { | ||
| ReaderType::BYOB(_) => { | ||
| unreachable!("Native reading of a chunk can only be done with a default reader.") |
There was a problem hiding this comment.
What I mean is that here, unlike at read_a_chunk, the point is to actually use a BYOB reader for the native reading of chunk as part of the piping flow. And doing so will hit this branch of logic, and panic. Is my understanding correct?
| return promise_rejects_js(t, TypeError, rs.pipeTo(ws)).then(() => { | ||
| assert_false(ws.locked, 'the WritableStream must remain unlocked after pipeTo rejection'); | ||
| }); | ||
| }, 'pipeTo must fail if the ReadableStream is locked with a BYOB reader, and must not lock the WritableStream'); |
There was a problem hiding this comment.
I think the logic of those two tests is already covered in the main suite, and what we need instead is a simply tests that actually enqueues chunks and pipes them successfully(I believe such a test would crash with the current implementation, so it's actually a good idea to write the test first and check that this is a correct assumption).
|
I will make this one a draft and address it later. |
Part of #34676, Fix #36013