New issue
Advanced search Search tips

Issue 689208 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

FileReader.abort should not fire error event.

Project Member Reported by mek@chromium.org, Feb 6 2017

Issue description

The 'error', 'abort' and 'load' events are defined as mutually exclusive, yet in case of abort we fire both an error and an abort event.
See tests in https://github.com/w3c/web-platform-tests/pull/4747

Edge and firefox do the correct thing, and only fire an abort event in this situation.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Feb 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c78653065fa6d8fb524e48a5d7232f3ab5eab4ab

commit c78653065fa6d8fb524e48a5d7232f3ab5eab4ab
Author: mek <mek@chromium.org>
Date: Tue Feb 07 20:13:44 2017

FileReader.abort() should not fire an error event.

The 'error', 'abort' and 'load' events are mutually exclusive. Each read
operation should only result in one of these events. So stop the error
event from being fired by the abort method, to align our behavior with
at least firefox and edge.

(at the time our implementation was written, the spec did still require
an error event as well for this case, but that was changed fairly soon after
in the spec)

Test landed upstream in https://github.com/w3c/web-platform-tests/pull/4747

BUG= 689208 

Review-Url: https://codereview.chromium.org/2680603002
Cr-Commit-Position: refs/heads/master@{#448714}

[modify] https://crrev.com/c78653065fa6d8fb524e48a5d7232f3ab5eab4ab/chrome/test/data/extensions/api_test/file_system_provider/read_file/test.js
[delete] https://crrev.com/16305b01e5fa25c11eff50d34238bc6576781fa4/third_party/WebKit/LayoutTests/external/wpt/FileAPI/reading-data-section/filereader_abort-expected.txt
[modify] https://crrev.com/c78653065fa6d8fb524e48a5d7232f3ab5eab4ab/third_party/WebKit/LayoutTests/fast/files/file-reader-abort-expected.txt
[modify] https://crrev.com/c78653065fa6d8fb524e48a5d7232f3ab5eab4ab/third_party/WebKit/Source/core/fileapi/FileReader.cpp

Comment 2 by mek@chromium.org, Feb 7 2017

Status: Fixed (was: Started)
Components: Blink>Storage>FileAPI
Components: -Blink>FileAPI

Sign in to add a comment