| Index: content/browser/service_worker/embedded_worker_instance.cc
|
| diff --git a/content/browser/service_worker/embedded_worker_instance.cc b/content/browser/service_worker/embedded_worker_instance.cc
|
| index 2806f12aa2b4af875b7c9aa1059a14ad100c0d13..20a26c897f8778e7439119d363c7c6b24d1cc344 100644
|
| --- a/content/browser/service_worker/embedded_worker_instance.cc
|
| +++ b/content/browser/service_worker/embedded_worker_instance.cc
|
| @@ -93,7 +93,7 @@ EmbeddedWorkerInstance::~EmbeddedWorkerInstance() {
|
| if (worker_devtools_agent_route_id_ != MSG_ROUTING_NONE)
|
| NotifyWorkerDestroyed(process_id_, worker_devtools_agent_route_id_);
|
| if (context_ && process_id_ != -1)
|
| - context_->process_manager()->ReleaseWorkerProcess(process_id_);
|
| + context_->process_manager()->ReleaseWorkerProcess(embedded_worker_id_);
|
| registry_->RemoveWorker(process_id_, embedded_worker_id_);
|
| }
|
|
|
| @@ -117,6 +117,7 @@ void EmbeddedWorkerInstance::Start(int64 service_worker_version_id,
|
| params->worker_devtools_agent_route_id = MSG_ROUTING_NONE;
|
| params->pause_on_start = false;
|
| context_->process_manager()->AllocateWorkerProcess(
|
| + embedded_worker_id_,
|
| SortProcesses(possible_process_ids),
|
| script_url,
|
| base::Bind(&EmbeddedWorkerInstance::RunProcessAllocated,
|
| @@ -186,7 +187,8 @@ void EmbeddedWorkerInstance::RunProcessAllocated(
|
| return;
|
| }
|
| if (!instance) {
|
| - context->process_manager()->ReleaseWorkerProcess(process_id);
|
| + context->process_manager()->ReleaseWorkerProcess(
|
| + instance->embedded_worker_id_);
|
| callback.Run(SERVICE_WORKER_ERROR_ABORT);
|
| return;
|
| }
|
| @@ -249,7 +251,7 @@ void EmbeddedWorkerInstance::OnStopped() {
|
| if (worker_devtools_agent_route_id_ != MSG_ROUTING_NONE)
|
| NotifyWorkerDestroyed(process_id_, worker_devtools_agent_route_id_);
|
| if (context_)
|
| - context_->process_manager()->ReleaseWorkerProcess(process_id_);
|
| + context_->process_manager()->ReleaseWorkerProcess(embedded_worker_id_);
|
| status_ = STOPPED;
|
| process_id_ = -1;
|
| thread_id_ = -1;
|
|
|