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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.cpp

Issue 2402983002: [TimeZoneMonitor] Decouple renderer side impl from content to blink. (Closed)
Patch Set: Initialize mojo before initializing blink Created 4 years, 2 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/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;

Powered by Google App Engine
This is Rietveld 408576698