Remove DataSlice, fix #12249

This commit is contained in:
Zhen Zhang 2016-07-05 16:42:07 +08:00
parent 1cba3b3e98
commit ab14777312
12 changed files with 61 additions and 163 deletions

View file

@ -324,9 +324,9 @@ impl HTMLFormElement {
content_disposition,
content_type));
let slice = f.upcast::<Blob>().get_slice_or_empty();
let bytes = &f.upcast::<Blob>().get_bytes().unwrap_or(vec![])[..];
let decoded = encoding.decode(&slice.get_bytes(), DecoderTrap::Replace)
let decoded = encoding.decode(bytes, DecoderTrap::Replace)
.expect("Invalid encoding in file");
result.push_str(&decoded);
}