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

Unified Diff: Source/web/WebEmbeddedWorkerImpl.cpp

Issue 704063002: Terminate and wait the worker thread in ~WebEmbeddedWorkerImpl() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebEmbeddedWorkerImpl.cpp
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp
index 8dc72fbc5e0e1a35535053f97157ce227a1cfde7..24a2327033df1285e3e2da989832efe0c811ef32 100644
--- a/Source/web/WebEmbeddedWorkerImpl.cpp
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp
@@ -51,7 +51,6 @@
#include "platform/network/ContentSecurityPolicyParsers.h"
#include "public/platform/Platform.h"
#include "public/platform/WebURLRequest.h"
-#include "public/platform/WebWaitableEvent.h"
#include "public/web/WebDevToolsAgent.h"
#include "public/web/WebServiceWorkerContextClient.h"
#include "public/web/WebServiceWorkerNetworkProvider.h"
@@ -172,10 +171,8 @@ WebEmbeddedWorkerImpl::WebEmbeddedWorkerImpl(
WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl()
{
- if (m_workerThread) {
- ASSERT(m_workerThread->terminated());
- m_workerThread->terminationEvent()->wait();
- }
+ if (m_workerThread)
+ m_workerThread->terminateAndWait();
ASSERT(runningWorkerInstances().contains(this));
runningWorkerInstances().remove(this);
« no previous file with comments | « Source/core/workers/WorkerThread.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698