aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filereader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/filereader.rs')
-rw-r--r--components/script/dom/filereader.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/components/script/dom/filereader.rs b/components/script/dom/filereader.rs
index 2cf7baff144..95b0572c3c5 100644
--- a/components/script/dom/filereader.rs
+++ b/components/script/dom/filereader.rs
@@ -494,8 +494,10 @@ fn perform_annotated_read_operation(
let task = FileReadingTask::ProcessRead(filereader.clone(), gen_id);
task_source.queue_with_canceller(task, &canceller).unwrap();
- let task = FileReadingTask::ProcessReadData(filereader.clone(), gen_id);
- task_source.queue_with_canceller(task, &canceller).unwrap();
+ if !blob_contents.is_empty() {
+ let task = FileReadingTask::ProcessReadData(filereader.clone(), gen_id);
+ task_source.queue_with_canceller(task, &canceller).unwrap();
+ }
let task = FileReadingTask::ProcessReadEOF(filereader, gen_id, data, blob_contents);
task_source.queue_with_canceller(task, &canceller).unwrap();