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

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

Issue 684223004: ServiceWorker: Fix data race in shutdown sequence (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/WorkerThread.cpp
diff --git a/Source/core/workers/WorkerThread.cpp b/Source/core/workers/WorkerThread.cpp
index 4afc1f86c0dd84d85880c9f0ca1d31ee3f73c104..f67780dcb86c32f9727af46c2364d148e18eaa8c 100644
--- a/Source/core/workers/WorkerThread.cpp
+++ b/Source/core/workers/WorkerThread.cpp
@@ -415,6 +415,12 @@ void WorkerThread::stopInShutdownSequence()
stopInternal();
}
+void WorkerThread::terminateAndWait()
+{
+ stop();
horo 2014/10/30 08:14:47 I think we don't need to call stop() from the dest
Kunihiko Sakamoto 2014/10/30 08:31:29 Done.
+ terminationEvent()->wait();
+}
+
bool WorkerThread::terminated()
{
MutexLocker lock(m_threadCreationMutex);
« no previous file with comments | « Source/core/workers/WorkerThread.h ('k') | Source/web/WebEmbeddedWorkerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698