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

Unified Diff: content/worker/websharedworker_stub.cc

Issue 23496052: Kill worker process by way of a sync IPC message before it cleans up. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix indentation Created 7 years, 3 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
« content/common/worker_messages.h ('K') | « content/common/worker_messages.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/worker/websharedworker_stub.cc
diff --git a/content/worker/websharedworker_stub.cc b/content/worker/websharedworker_stub.cc
index 745b63c1956abf61d13cd564e4ef1667c38fa23b..79753eceed32dd2128ca76a581c832abb6522819 100644
--- a/content/worker/websharedworker_stub.cc
+++ b/content/worker/websharedworker_stub.cc
@@ -45,6 +45,14 @@ WebSharedWorkerStub::~WebSharedWorkerStub() {
impl_->clientDestroyed();
WorkerThread* worker_thread = WorkerThread::current();
DCHECK(worker_thread);
+
+ // Send an IPC message to kill the worker process.
+ bool result = false;
+ worker_thread->Send(new WorkerProcessHostMsg_ForceKillWorker(
+ route_id_,
+ base::GetCurrentProcessHandle(),
+ &result));
+
worker_thread->RemoveWorkerStub(this);
worker_thread->RemoveRoute(route_id_);
ChildProcess::current()->ReleaseProcess();
« content/common/worker_messages.h ('K') | « content/common/worker_messages.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698