Chromium Code Reviews

Unified Diff: third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp

Issue 1549143002: Add thread affinity and ASSERT() for same-thread restriction to WTF::Function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_ThreadSafeBindByVariadicTemplate
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
diff --git a/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp b/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
index 8a757d43939e37c12168300c8cb3ca0495b75903..c75e7e8302daeffc9e4c27cf163c493988d3229b 100644
--- a/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
+++ b/third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.cpp
@@ -11,12 +11,12 @@
namespace blink {
-static void RunBackgroundTask(PassOwnPtr<Closure> closure)
+static void RunBackgroundTask(PassOwnPtr<CrossThreadClosure> closure)
{
(*closure)();
}
-void BackgroundTaskRunner::postOnBackgroundThread(const WebTraceLocation& location, PassOwnPtr<Closure> closure, TaskSize taskSize)
+void BackgroundTaskRunner::postOnBackgroundThread(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosure> closure, TaskSize taskSize)
{
tracked_objects::Location baseLocation(location.functionName(), location.fileName(), 0, nullptr);
base::WorkerPool::PostTask(baseLocation, base::Bind(&RunBackgroundTask, closure), taskSize == TaskSizeLongRunningTask);
« no previous file with comments | « third_party/WebKit/Source/platform/threading/BackgroundTaskRunner.h ('k') | third_party/WebKit/Source/wtf/Forward.h » ('j') | no next file with comments »

Powered by Google App Engine