Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: Source/core/fileapi/FileReader.cpp

Issue 478263002: Avoid GCing an aborting and stopped FileReader. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/fast/files/resources/file-reader-abort-gc-iframe.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/fileapi/FileReader.cpp
diff --git a/Source/core/fileapi/FileReader.cpp b/Source/core/fileapi/FileReader.cpp
index 36361c26914f2c8b0ec7203419fd548a6c00028d..9ca0c46d6ae338fd25a09fa31be8ef49dd4f3b77 100644
--- a/Source/core/fileapi/FileReader.cpp
+++ b/Source/core/fileapi/FileReader.cpp
@@ -243,6 +243,10 @@ const AtomicString& FileReader::interfaceName() const
void FileReader::stop()
{
+ // The delayed abort task tidies up and advances to the DONE state.
+ if (m_loadingState == LoadingStateAborted)
+ return;
+
if (hasPendingActivity())
ThrottlingController::finishReader(executionContext(), this, ThrottlingController::removeReader(executionContext(), this));
terminate();
« no previous file with comments | « LayoutTests/fast/files/resources/file-reader-abort-gc-iframe.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698