| 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 40f3d866dfe439d0ad129014e3f8b2a31a17aa01..e4c50c0b9150bfc3007e72cc42ae8056d7e5809c 100644
|
| --- a/content/browser/worker_host/worker_process_host.cc
|
| +++ b/content/browser/worker_host/worker_process_host.cc
|
| @@ -323,6 +323,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()
|
|
|
| @@ -393,6 +395,14 @@ void WorkerProcessHost::OnAllowIndexedDB(int worker_route_id,
|
| url, name, resource_context_, GetRenderViewIDsForWorker(worker_route_id));
|
| }
|
|
|
| +void WorkerProcessHost::OnForceKillWorkerProcess() {
|
| + if (process_ && process_launched_)
|
| + base::KillProcess(
|
| + process_->GetData().handle, RESULT_CODE_NORMAL_EXIT, false);
|
| + else
|
| + RecordAction(UserMetricsAction("WorkerProcess_BadProcessToKill"));
|
| +}
|
| +
|
| void WorkerProcessHost::RelayMessage(
|
| const IPC::Message& message,
|
| WorkerMessageFilter* filter,
|
|
|