Don't slice a sliced blob (#36866)

When slicing a blob that is already sliced we should reference it's
parent's data instead of creating a subview into the sliced blob. This
keeps the blob ancestry chain small and reduces the number of blobs that
we have to resolve.

Testing: Includes a new crashtest
Fixes: https://github.com/servo/servo/issues/36843

[try
run](https://github.com/simonwuelker/servo/actions/runs/14844873660)

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-06 09:25:11 +02:00 committed by GitHub
parent 3b806ca424
commit 54c2818974
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 76 additions and 69 deletions

View file

@ -737,7 +737,7 @@ impl RangeRequestBounds {
RangeRequestBounds::Final(pos) => {
if let Some(len) = len {
if pos.start <= len as i64 {
return Ok(pos.clone());
return Ok(*pos);
}
}
Err("Tried to process RangeRequestBounds::Final without len")