diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-05 06:24:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-05 06:24:46 -0700 |
commit | 87c77725279ba3f1b612e27fccf353c81eae17b8 (patch) | |
tree | 6c808ba9d7dd60914cf5b156906e59e0c49e6535 /components/script/dom/file.rs | |
parent | 9860584edf8e1ae4783d6ac4d75bda6b06da2057 (diff) | |
parent | ab14777312b6bc0e21736f907bc22364dea143d3 (diff) | |
download | servo-87c77725279ba3f1b612e27fccf353c81eae17b8.tar.gz servo-87c77725279ba3f1b612e27fccf353c81eae17b8.zip |
Auto merge of #12258 - izgzhen:remove-data-slice, r=Manishearth
Remove DataSlice, fix #12249
r? @Manishearth
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #12249
<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- 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/12258)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r-- | components/script/dom/file.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs index bfc6b886282..75f73aeda59 100644 --- a/components/script/dom/file.rs +++ b/components/script/dom/file.rs @@ -10,7 +10,7 @@ use dom::bindings::global::GlobalRef; use dom::bindings::js::Root; use dom::bindings::reflector::reflect_dom_object; use dom::bindings::str::DOMString; -use dom::blob::{Blob, BlobImpl, DataSlice, blob_parts_to_bytes}; +use dom::blob::{Blob, BlobImpl, blob_parts_to_bytes}; use dom::window::Window; use net_traits::filemanager_thread::SelectedFile; use time; @@ -71,9 +71,8 @@ impl File { let ref blobPropertyBag = filePropertyBag.parent; let typeString = blobPropertyBag.get_typestring(); - let slice = DataSlice::from_bytes(bytes); let modified = filePropertyBag.lastModified; - Ok(File::new(global, BlobImpl::new_from_slice(slice), filename, modified, &typeString)) + Ok(File::new(global, BlobImpl::new_from_bytes(bytes), filename, modified, &typeString)) } pub fn name(&self) -> &DOMString { |