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

Unified Diff: third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp

Issue 2645473005: FileSystem: Migrate ExecutionContextTask to WTF::Closure (Closed)
Patch Set: wrapWeakPersistent Created 3 years, 11 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 | « third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
diff --git a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
index 99752df622f03960d426d13de012dd3cc0e71f50..60a74eb192e6e0aed28debacee42f21cbbd664dc 100644
--- a/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
+++ b/third_party/WebKit/Source/modules/filesystem/FileSystemCallbacks.cpp
@@ -88,12 +88,13 @@ void FileSystemCallbacksBase::invokeOrScheduleCallback(CB* callback,
CBArg arg) {
DCHECK(callback);
if (callback) {
- if (shouldScheduleCallback())
+ if (shouldScheduleCallback()) {
DOMFileSystem::scheduleCallback(
m_executionContext.get(),
- createSameThreadTask(&CB::invoke, wrapPersistent(callback), arg));
- else
+ WTF::bind(&CB::invoke, wrapPersistent(callback), arg));
+ } else {
callback->invoke(arg);
+ }
}
m_executionContext.clear();
}
@@ -103,13 +104,14 @@ void FileSystemCallbacksBase::handleEventOrScheduleCallback(CB* callback,
CBArg* arg) {
DCHECK(callback);
if (callback) {
- if (shouldScheduleCallback())
+ if (shouldScheduleCallback()) {
DOMFileSystem::scheduleCallback(
m_executionContext.get(),
- createSameThreadTask(&CB::handleEvent, wrapPersistent(callback),
- wrapPersistent(arg)));
- else
+ WTF::bind(&CB::handleEvent, wrapPersistent(callback),
+ wrapPersistent(arg)));
+ } else {
callback->handleEvent(arg);
+ }
}
m_executionContext.clear();
}
@@ -118,12 +120,13 @@ template <typename CB>
void FileSystemCallbacksBase::handleEventOrScheduleCallback(CB* callback) {
DCHECK(callback);
if (callback) {
- if (shouldScheduleCallback())
+ if (shouldScheduleCallback()) {
DOMFileSystem::scheduleCallback(
m_executionContext.get(),
- createSameThreadTask(&CB::handleEvent, wrapPersistent(callback)));
- else
+ WTF::bind(&CB::handleEvent, wrapPersistent(callback)));
+ } else {
callback->handleEvent();
+ }
}
m_executionContext.clear();
}
« no previous file with comments | « third_party/WebKit/Source/modules/filesystem/DirectoryReader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698