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

Unified Diff: third_party/WebKit/Source/core/dom/ExecutionContextTask.h

Issue 2748953002: Remove createSameThreadTask() and deprecate createCrossThreadTask() (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/mojo/MojoWatcher.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/ExecutionContextTask.h
diff --git a/third_party/WebKit/Source/core/dom/ExecutionContextTask.h b/third_party/WebKit/Source/core/dom/ExecutionContextTask.h
index 8f76cb9de2e59311aaf592971d4ee84a10272d91..9d7ebd4a9b54129efa5a6b383826fbe97868d6ce 100644
--- a/third_party/WebKit/Source/core/dom/ExecutionContextTask.h
+++ b/third_party/WebKit/Source/core/dom/ExecutionContextTask.h
@@ -101,19 +101,15 @@ std::unique_ptr<CallClosureTask<T, threadAffinity>> createCallClosureTask(
} // namespace internal
-// Create tasks passed within a single thread.
-// When posting tasks within a thread, use |createSameThreadTask| instead
-// of using |bind| directly to state explicitly that there is no need to care
-// about thread safety when posting the task.
-// When posting tasks across threads, use |createCrossThreadTask|.
-template <typename FunctionType, typename... P>
-std::unique_ptr<ExecutionContextTask> createSameThreadTask(
- FunctionType function,
- P&&... parameters) {
- return internal::createCallClosureTask(
- WTF::bind(function, std::forward<P>(parameters)...));
-}
-
+// createSameThreadTask() is deprecated and removed.
+// Use WTF::bind() and post it to WebTaskRunner obtained by
+// TaskRunnerHelper::get() when posting a task within a single thread.
+
+// createCrossThreadTask() is deprecated and will be removed.
+// Use crossThreadBind() and post it to an appropriate task runner
+// when posting a task to another thread.
+// See https://crbug.com/625927 for details.
+//
// createCrossThreadTask(...) is ExecutionContextTask version of
// crossThreadBind().
// Using WTF::bind() directly is not thread-safe due to temporary objects, see
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/mojo/MojoWatcher.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698