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

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

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years 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 76a77d28a61e2e4598e39cedaad76fc55baaa2e6..5f3efdb3b2b15d73b6e02e4e2349c687851b881d 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
@@ -187,13 +187,11 @@ class FileReader::ThrottlingController final
};
FileReader* FileReader::create(ExecutionContext* context) {
- FileReader* fileReader = new FileReader(context);
- fileReader->suspendIfNeeded();
- return fileReader;
+ return new FileReader(context);
}
FileReader::FileReader(ExecutionContext* context)
- : SuspendableObject(context),
+ : ContextLifecycleObserver(context),
m_state(kEmpty),
m_loadingState(LoadingStateNone),
m_stillFiringEvents(false),
@@ -472,7 +470,7 @@ void FileReader::fireEvent(const AtomicString& type) {
DEFINE_TRACE(FileReader) {
visitor->trace(m_error);
EventTargetWithInlineData::trace(visitor);
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::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