aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/formdata.rs
diff options
context:
space:
mode:
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)
}