diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2019-10-10 17:50:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-10-10 17:50:37 -0400 |
commit | b3a97f29e81cbd06b731a0e499562c4132f125ab (patch) | |
tree | 9c63dc806511971821388df374dc5933a3d15fc3 | |
parent | ab8d99856ec50752f1ec58086fc684d5e83eeaaf (diff) | |
parent | 6735b68a00837562c5ca24473c845ad6e3ac7d65 (diff) | |
download | servo-b3a97f29e81cbd06b731a0e499562c4132f125ab.tar.gz servo-b3a97f29e81cbd06b731a0e499562c4132f125ab.zip |
Auto merge of #24312 - SiddharthaMishra:master, r=jdm
don't send progress event for empty blob
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #24289 (GitHub issue number if applicable)
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because ___
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24312)
<!-- Reviewable:end -->
-rw-r--r-- | components/script/dom/filereader.rs | 6 | ||||
-rw-r--r-- | tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini | 9 |
2 files changed, 4 insertions, 11 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(); diff --git a/tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini b/tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini deleted file mode 100644 index 7f3c6796ed5..00000000000 --- a/tests/wpt/metadata/FileAPI/reading-data-section/filereader_events.any.js.ini +++ /dev/null @@ -1,9 +0,0 @@ -[filereader_events.any.html] - [events are dispatched in the correct order for an empty blob] - expected: FAIL - - -[filereader_events.any.worker.html] - [events are dispatched in the correct order for an empty blob] - expected: FAIL - |