Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 40bdd4bde9f5fb62c2d3b7e0c5377caf5f34e488
https://github.com/WebKit/WebKit/commit/40bdd4bde9f5fb62c2d3b7e0c5377caf5f34e488
Author: Chris Dumez <[email protected]>
Date: 2026-07-30 (Thu, 30 Jul 2026)
Changed paths:
M
LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any-expected.txt
M
LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js
M
LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker-expected.txt
M Source/WebCore/fileapi/FileReader.cpp
Log Message:
-----------
FileReader.abort() is silently ignored on a reused reader after a prior read
completes
https://bugs.webkit.org/show_bug.cgi?id=320623
Reviewed by Darin Adler.
FileReader::abort() early-returns when m_finishedLoading is true. That flag is
set inside the didFinishLoading task and was intended (230152@main) only to
preserve behavior when abort() is called re-entrantly from within the last
onprogress event. However, m_finishedLoading was never reset when a new read
started, so once any read completed the flag stayed true for the lifetime of the
FileReader.
As a result, reusing a FileReader (which is allowed by the spec once readyState
is no longer LOADING) left abort() permanently disabled: a subsequent read that
is genuinely in progress could not be aborted, and instead of firing
abort/loadend it ran to completion and delivered load and a result.
Reset m_finishedLoading = false in readInternal() when starting a new read, so
the guard is once again scoped to the intended last-onprogress-event window.
No new tests, updated
imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js.
*
LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any-expected.txt:
*
LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.js:
(promise_test.t.return.eventWatcher.wait_for.string_appeared_here.then.eventWatcher.wait_for.string_appeared_here.then.eventWatcher.wait_for.string_appeared_here.then):
(promise_test.t.then):
*
LayoutTests/imported/w3c/web-platform-tests/FileAPI/reading-data-section/filereader_abort.any.worker-expected.txt:
* Source/WebCore/fileapi/FileReader.cpp:
(WebCore::FileReader::readInternal):
Canonical link: https://commits.webkit.org/318288@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications