diff options
Diffstat (limited to 'components/script/dom/htmlformelement.rs')
-rw-r--r-- | components/script/dom/htmlformelement.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/script/dom/htmlformelement.rs b/components/script/dom/htmlformelement.rs index 515d49c0f7c..fa79e25dd0a 100644 --- a/components/script/dom/htmlformelement.rs +++ b/components/script/dom/htmlformelement.rs @@ -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); } |