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

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

Issue 2680013008: Reduce use of ExecutionContextTask in core/ (Closed)
Patch Set: fix stacktrace Created 3 years, 10 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 94c36ca14bdc714877e1e579f1956c698bcc9037..6d32b49314641a81c7f040ccc11fcb147515dcaa 100644
--- a/third_party/WebKit/Source/core/fileapi/FileReader.cpp
+++ b/third_party/WebKit/Source/core/fileapi/FileReader.cpp
@@ -36,7 +36,6 @@
#include "core/dom/Document.h"
#include "core/dom/ExceptionCode.h"
#include "core/dom/ExecutionContext.h"
-#include "core/dom/ExecutionContextTask.h"
#include "core/dom/TaskRunnerHelper.h"
#include "core/events/ProgressEvent.h"
#include "core/fileapi/File.h"
@@ -353,9 +352,9 @@ void FileReader::abort() {
// called from the event handler and we do not want the resource loading code
// to be on the stack when doing so. The persistent reference keeps the
// reader alive until the task has completed.
- getExecutionContext()->postTask(
- TaskType::FileReading, BLINK_FROM_HERE,
- createSameThreadTask(&FileReader::terminate, wrapPersistent(this)));
+ TaskRunnerHelper::get(TaskType::FileReading, getExecutionContext())
+ ->postTask(BLINK_FROM_HERE,
+ WTF::bind(&FileReader::terminate, wrapPersistent(this)));
}
void FileReader::result(StringOrArrayBuffer& resultAttribute) const {

Powered by Google App Engine
This is Rietveld 408576698