mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
fix: ReadableStream::get_in_memory_bytes
too large (#36914)
Fix a IPC hang due to `ReadableStream::get_in_memory_bytes` could return really huge chunk. Testing: WPT on ReadableStream should pass Fixes: IPC hang when transferring huge chunk bytes from `ReadableStream` cc @gterzian @Taym95 since this is also related to ReadableStream. --------- Signed-off-by: Yu Wei Wu <yuweiwu@YunoMacBook-Air.local> Co-authored-by: Yu Wei Wu <yuweiwu@YunoMacBook-Air.local>
This commit is contained in:
parent
c37d5572fd
commit
aa4ad0f2be
5 changed files with 29 additions and 20 deletions
|
@ -8,7 +8,7 @@ use base::id::{PipelineId, WebViewId};
|
|||
use content_security_policy::{self as csp};
|
||||
use http::header::{AUTHORIZATION, HeaderName};
|
||||
use http::{HeaderMap, Method};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender, IpcSharedMemory};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use mime::Mime;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -156,7 +156,7 @@ pub enum BodySource {
|
|||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum BodyChunkResponse {
|
||||
/// A chunk of bytes.
|
||||
Chunk(Vec<u8>),
|
||||
Chunk(IpcSharedMemory),
|
||||
/// The body is done.
|
||||
Done,
|
||||
/// There was an error streaming the body,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue