dom: Append stream chunks in the correct order. (#33487)

* Append stream chunks in the correct order.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Run mimesniff tests in CI.

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

* Delete tests/wpt/meta/mimesniff/media/media-sniff.window.js.ini

Signed-off-by: Josh Matthews <josh@joshmatthews.net>

---------

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2024-09-18 06:09:15 -04:00 committed by GitHub
parent 313fc663a6
commit aa5bf94b35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 6563 additions and 2 deletions

View file

@ -470,8 +470,7 @@ impl ExternalUnderlyingSourceController {
fn enqueue_chunk(&self, cx: SafeJSContext, stream: HandleObject, mut chunk: Vec<u8>) {
let available = {
let mut buffer = self.buffer.borrow_mut();
chunk.append(&mut buffer);
*buffer = chunk;
buffer.append(&mut chunk);
buffer.len()
};
self.maybe_signal_available_bytes(cx, stream, available);