mirror of
https://github.com/servo/servo.git
synced 2025-06-28 19:13:41 +01:00
Add file backend support for Blob and related - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy --faster` does not report any errors - [x] These changes fix #10851, related to #11131 - [x] These changes do not require tests because the implementation is partial and can't work alone 1. Add new backend to `Blob` and a `BlobImpl` struct to abstract multiple backends 2. Rewrite most interfaces of `Blob` to accommodate the change 3. Change the `read` behaviour of `FileReader`, considering the case when blob is file-backed and not cached The design is still immature, welcome comments! - [x] I used `DOMRefCell` to cache the bytes in `BlobImpl`, is it sound? - [x] The interfaces (like `BlobImpl::get_bytes`) handle requests in a default-to-empty way when the inner `DataSlice` is not cached. It might be possible to handle this condition better. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11221) <!-- Reviewable:end --> |
||
---|---|---|
.. | ||
docs | ||
dom | ||
parse | ||
task_source | ||
bluetooth_blacklist.rs | ||
build.rs | ||
Cargo.toml | ||
clipboard_provider.rs | ||
cors.rs | ||
devtools.rs | ||
document_loader.rs | ||
layout_interface.rs | ||
lib.rs | ||
makefile.cargo | ||
mem.rs | ||
network_listener.rs | ||
origin.rs | ||
reporter.rs | ||
script_runtime.rs | ||
script_thread.rs | ||
textinput.rs | ||
timers.rs | ||
unpremultiplytable.rs | ||
webdriver_handlers.rs |