aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/readablestream.rs
diff options
context:
space:
mode:
authorJosh Matthews <josh@joshmatthews.net>2024-09-18 06:09:15 -0400
committerGitHub <noreply@github.com>2024-09-18 10:09:15 +0000
commitaa5bf94b35fb796a8f95784b6848364233db6cdf (patch)
tree404df68e18cedad4428220b5eefd3b3754430115 /components/script/dom/readablestream.rs
parent313fc663a6d3076349a1170f9dabc953922ea278 (diff)
downloadservo-aa5bf94b35fb796a8f95784b6848364233db6cdf.tar.gz
servo-aa5bf94b35fb796a8f95784b6848364233db6cdf.zip
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>
Diffstat (limited to 'components/script/dom/readablestream.rs')
-rw-r--r--components/script/dom/readablestream.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/components/script/dom/readablestream.rs b/components/script/dom/readablestream.rs
index 19145e40a5d..24272757071 100644
--- a/components/script/dom/readablestream.rs
+++ b/components/script/dom/readablestream.rs
@@ -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);