diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-01 05:09:21 -0500 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-06-01 05:09:21 -0500 |
commit | 3d7b17681dc9c20358fda9efc72575feb968cc81 (patch) | |
tree | 36dc60d988c9fc2d1260b2f3eae092569a02457e /components/script/lib.rs | |
parent | 09e6f4ac546a77294d9af7fe0ff0bc344be8de91 (diff) | |
parent | 43ad4ba5857dbcd1a31aaf7e441c5cfe4fe1b84f (diff) | |
download | servo-3d7b17681dc9c20358fda9efc72575feb968cc81.tar.gz servo-3d7b17681dc9c20358fda9efc72575feb968cc81.zip |
Auto merge of #11221 - izgzhen:blob-file-backend, r=Manishearth
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 -->
Diffstat (limited to 'components/script/lib.rs')
-rw-r--r-- | components/script/lib.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/components/script/lib.rs b/components/script/lib.rs index 6e978eb01c1..77ff99aab97 100644 --- a/components/script/lib.rs +++ b/components/script/lib.rs @@ -19,6 +19,7 @@ #![feature(plugin)] #![feature(slice_patterns)] #![feature(stmt_expr_attributes)] +#![feature(question_mark)] #![deny(unsafe_code)] #![allow(non_snake_case)] |