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

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

Issue 1808533003: Revert of Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: third_party/WebKit/Source/core/fileapi/FileReader.cpp
diff --git a/third_party/WebKit/Source/core/fileapi/FileReader.cpp b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
index b654c90a608f498e3a9e91a6ef20ea5678c97c4a..c4ad7b6ea34eeaf00e94bc9863d18db8ecc3d4d1 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
@@ -196,11 +196,13 @@
FileReader* FileReader::create(ExecutionContext* context)
{
- return new FileReader(context);
+ FileReader* fileReader = new FileReader(context);
+ fileReader->suspendIfNeeded();
+ return fileReader;
}
FileReader::FileReader(ExecutionContext* context)
- : ContextLifecycleObserver(context)
+ : ActiveDOMObject(context)
, m_state(EMPTY)
, m_loadingState(LoadingStateNone)
, m_readType(FileReaderLoader::ReadAsBinaryString)
@@ -219,7 +221,7 @@
return EventTargetNames::FileReader;
}
-void FileReader::contextDestroyed()
+void FileReader::stop()
{
// The delayed abort task tidies up and advances to the DONE state.
if (m_loadingState == LoadingStateAborted)
@@ -469,7 +471,7 @@
{
visitor->trace(m_error);
RefCountedGarbageCollectedEventTargetWithInlineData<FileReader>::trace(visitor);
- ContextLifecycleObserver::trace(visitor);
+ ActiveDOMObject::trace(visitor);
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/fileapi/FileReader.h ('k') | third_party/WebKit/Source/core/html/PublicURLManager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698