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

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 comment 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
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(
michaeln 2013/09/12 00:22:11 I think WorkerThread::Shutdown() would be a better
Mustafa Acer 2013/09/12 00:29:14 I started with that, but the route_id being remove
+ route_id_,
+ base::GetCurrentProcessHandle(),
+ &result));
+
worker_thread->RemoveWorkerStub(this);
worker_thread->RemoveRoute(route_id_);
ChildProcess::current()->ReleaseProcess();
« content/browser/worker_host/worker_process_host.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