Chromium Code Reviews| 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()) |
|
nhiroki
2016/10/13 10:24:12
isOwningBackingThread() returns true when this Wor
leonhsl(Using Gerrit)
2016/10/14 03:12:00
Oh,, I misunderstood that isOwningBackingThread()
nhiroki
2016/10/17 03:49:11
Yeah..., this is so confusing.
To be more precise
leonhsl(Using Gerrit)
2016/10/17 07:30:01
Done. Thank you very much for sharing the details
|
| + thread->postTask(location, std::move(task)); |
|
nhiroki
2016/10/13 10:24:12
|task| is moved here, so you can't use it on follo
leonhsl(Using Gerrit)
2016/10/14 03:12:00
My bad.. Thanks!
|
| + } |
| +} |
| + |
| PlatformThreadId WorkerThread::platformThreadId() { |
| if (!m_requestedToStart) |
| return 0; |