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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.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
Index: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index f9cdbfde727cf76e5b46101e44ee129882f6fdd9..24a2327033df1285e3e2da989832efe0c811ef32 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -171,6 +171,9 @@ WebEmbeddedWorkerImpl::WebEmbeddedWorkerImpl(
WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl()
{
+ if (m_workerThread)
+ m_workerThread->terminateAndWait();
+
ASSERT(runningWorkerInstances().contains(this));
runningWorkerInstances().remove(this);
ASSERT(m_webView);
« Source/core/workers/WorkerThread.cpp ('K') | « Source/core/workers/WorkerThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698