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

Unified Diff: content/browser/worker_host/worker_process_host.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/browser/worker_host/worker_process_host.cc
diff --git a/content/browser/worker_host/worker_process_host.cc b/content/browser/worker_host/worker_process_host.cc
index c537447f987a83de52b9c590334b3cf8fac83f02..7756c00ceae690db1fd0f4c5b926398c5cf5c8f1 100644
--- a/content/browser/worker_host/worker_process_host.cc
+++ b/content/browser/worker_host/worker_process_host.cc
@@ -337,6 +337,8 @@ bool WorkerProcessHost::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowDatabase, OnAllowDatabase)
IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowFileSystem, OnAllowFileSystem)
IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_AllowIndexedDB, OnAllowIndexedDB)
+ IPC_MESSAGE_HANDLER(WorkerProcessHostMsg_ForceKillWorker,
+ OnForceKillWorkerProcess)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
@@ -407,6 +409,12 @@ void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id,
url, name, resource_context_, GetRenderViewIDsForWorker(worker_route_id));
}
+void WorkerProcessHost::OnForceKillWorkerProcess(int worker_route_id,
+ base::ProcessHandle handle,
+ bool* result) {
+ *result = base::KillProcess(handle, 0, false);
+}
+
void WorkerProcessHost::RelayMessage(
const IPC::Message& message,
WorkerMessageFilter* filter,

Powered by Google App Engine
This is Rietveld 408576698