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

Unified Diff: third_party/WebKit/Source/modules/webdatabase/Database.cpp

Issue 2698153003: Reduce createSameThreadTask usage in modules/ (Closed)
Patch Set: Move a static callback to an anonymous namespace 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/modules/webdatabase/Database.cpp
diff --git a/third_party/WebKit/Source/modules/webdatabase/Database.cpp b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
index 9ea1dbf3d83136e2773d9b23e2c4e2ba9c620775..d7834ead3111562ef12dffd5cbfc3db12c04aff9 100644
--- a/third_party/WebKit/Source/modules/webdatabase/Database.cpp
+++ b/third_party/WebKit/Source/modules/webdatabase/Database.cpp
@@ -873,11 +873,10 @@ void Database::runTransaction(SQLTransactionCallback* callback,
if (callback) {
std::unique_ptr<SQLErrorData> error = SQLErrorData::create(
SQLError::kUnknownErr, "database has been closed");
- getExecutionContext()->postTask(
- TaskType::DatabaseAccess, BLINK_FROM_HERE,
- createSameThreadTask(&callTransactionErrorCallback,
- wrapPersistent(callback),
- WTF::passed(std::move(error))));
+ TaskRunnerHelper::get(TaskType::DatabaseAccess, getExecutionContext())
+ ->postTask(BLINK_FROM_HERE, WTF::bind(&callTransactionErrorCallback,
+ wrapPersistent(callback),
+ WTF::passed(std::move(error))));
}
}
}

Powered by Google App Engine
This is Rietveld 408576698