Index: third_party/WebKit/Source/core/workers/WorkerThread.cpp |
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp |
index f03dfb3508ee3a50d82574df321b0017c5fc9281..3b4554bace4b3c9ab95ed8be1ea38e5816b43036 100644 |
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp |
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp |
@@ -320,6 +320,18 @@ unsigned WorkerThread::workerThreadCount() { |
return workerThreads().size(); |
} |
+void WorkerThread::PostTaskToAllWorkerThreads( |
+ const WebTraceLocation& location, |
+ std::unique_ptr<ExecutionContextTask> task) { |
+ MutexLocker lock(threadSetMutex()); |
+ HashSet<WorkerThread*> threads = workerThreads(); |
+ |
+ for (WorkerThread* thread : threads) { |
+ if (thread->isOwningBackingThread()) |
+ thread->postTask(location, std::move(task)); |
+ } |
+} |
+ |
PlatformThreadId WorkerThread::platformThreadId() { |
if (!m_requestedToStart) |
return 0; |