mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove DataSlice, fix #12249
This commit is contained in:
parent
1cba3b3e98
commit
ab14777312
12 changed files with 61 additions and 163 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue