Index: Source/web/WebEmbeddedWorkerImpl.cpp |
diff --git a/Source/web/WebEmbeddedWorkerImpl.cpp b/Source/web/WebEmbeddedWorkerImpl.cpp |
index f9cdbfde727cf76e5b46101e44ee129882f6fdd9..9e5b495fac91e146cab5970f207328db747ec6e9 100644 |
--- a/Source/web/WebEmbeddedWorkerImpl.cpp |
+++ b/Source/web/WebEmbeddedWorkerImpl.cpp |
@@ -51,6 +51,7 @@ |
#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" |
@@ -171,6 +172,11 @@ WebEmbeddedWorkerImpl::WebEmbeddedWorkerImpl( |
WebEmbeddedWorkerImpl::~WebEmbeddedWorkerImpl() |
{ |
+ if (m_workerThread) { |
+ m_workerThread->stop(); |
+ m_workerThread->terminationEvent()->wait(); |
haraken
2014/10/30 02:40:24
Can we create a helper method like WorkerThread::t
Kunihiko Sakamoto
2014/10/30 04:50:15
Done.
|
+ } |
haraken
2014/10/30 02:40:24
Don't you need to call m_workerInspectorProxy->wor
Kunihiko Sakamoto
2014/10/30 04:50:15
No - WebEmbeddedWorkerImpl::terminateWorkerContext
|
+ |
ASSERT(runningWorkerInstances().contains(this)); |
runningWorkerInstances().remove(this); |
ASSERT(m_webView); |