diff options
author | Yerkebulan Tulibergenov <yerkebulan@gmail.com> | 2025-02-21 21:42:55 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-22 05:42:55 +0000 |
commit | 245a39c07eb14f1acb03c4d85aaa4901af863a71 (patch) | |
tree | 648c6d8de054b198aed81e680685afbce40ca457 /components/script/dom/readablestream.rs | |
parent | 35f21e426b2fec968ebd0970b743d43ac6fd012f (diff) | |
download | servo-245a39c07eb14f1acb03c4d85aaa4901af863a71.tar.gz servo-245a39c07eb14f1acb03c4d85aaa4901af863a71.zip |
refactor: add CanGc as argument to create_buffer_source (#35597)
Signed-off-by: Yerkebulan Tulibergenov <yerkebulan@gmail.com>
Diffstat (limited to 'components/script/dom/readablestream.rs')
-rw-r--r-- | components/script/dom/readablestream.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/script/dom/readablestream.rs b/components/script/dom/readablestream.rs index 7e26d171633..bc9a5dec08c 100644 --- a/components/script/dom/readablestream.rs +++ b/components/script/dom/readablestream.rs @@ -250,7 +250,7 @@ impl ReadableStream { UnderlyingSourceType::Memory(bytes.len()), can_gc, )?; - stream.enqueue_native(bytes); + stream.enqueue_native(bytes, can_gc); stream.controller_close_native(); Ok(stream) } @@ -375,12 +375,12 @@ impl ReadableStream { /// Endpoint to enqueue chunks directly from Rust. /// Note: in other use cases this call happens via the controller. - pub(crate) fn enqueue_native(&self, bytes: Vec<u8>) { + pub(crate) fn enqueue_native(&self, bytes: Vec<u8>, can_gc: CanGc) { match self.controller { ControllerType::Default(ref controller) => controller .get() .expect("Stream should have controller.") - .enqueue_native(bytes), + .enqueue_native(bytes, can_gc), _ => unreachable!( "Enqueueing chunk to a stream from Rust on other than default controller" ), |