aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/formdata.rs
diff options
context:
space:
mode:
authorZhen Zhang <izgzhen@gmail.com>2016-07-05 16:42:07 +0800
committerZhen Zhang <izgzhen@gmail.com>2016-07-05 17:51:53 +0800
commitab14777312b6bc0e21736f907bc22364dea143d3 (patch)
tree9cd66fac8556e87da7b483785a8c8a27de1527ec /components/script/dom/formdata.rs
parent1cba3b3e9835fffbae91ab9dac76ed1f75bcf5c7 (diff)
downloadservo-ab14777312b6bc0e21736f907bc22364dea143d3.tar.gz
servo-ab14777312b6bc0e21736f907bc22364dea143d3.zip
Remove DataSlice, fix #12249
Diffstat (limited to 'components/script/dom/formdata.rs')
-rw-r--r--components/script/dom/formdata.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/dom/formdata.rs b/components/script/dom/formdata.rs
index 6d5b1900ec5..41168495847 100644
--- a/components/script/dom/formdata.rs
+++ b/components/script/dom/formdata.rs
@@ -126,8 +126,9 @@ impl FormData {
Some(fname) => {
let global = self.global();
let name = DOMString::from(fname.0);
- let slice = blob.get_slice_or_empty();
- Root::upcast(File::new(global.r(), BlobImpl::new_from_slice(slice), name, None, ""))
+ let bytes = blob.get_bytes().unwrap_or(vec![]);
+
+ Root::upcast(File::new(global.r(), BlobImpl::new_from_bytes(bytes), name, None, ""))
}
None => Root::from_ref(blob)
}