| 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 fd2d201a660b547b7a5dfd43f6cf7d8e765d4dd2..8e38212e3d7383e6b034ca53a14c6285633a96be 100644
|
| --- a/content/browser/service_worker/embedded_worker_instance.cc
|
| +++ b/content/browser/service_worker/embedded_worker_instance.cc
|
| @@ -8,6 +8,7 @@
|
| #include "content/browser/devtools/embedded_worker_devtools_manager.h"
|
| #include "content/browser/service_worker/embedded_worker_registry.h"
|
| #include "content/browser/service_worker/service_worker_context_core.h"
|
| +#include "content/browser/service_worker/service_worker_context_wrapper.h"
|
| #include "content/common/service_worker/embedded_worker_messages.h"
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/render_process_host.h"
|
| @@ -92,8 +93,10 @@ EmbeddedWorkerInstance::~EmbeddedWorkerInstance() {
|
| Stop();
|
| 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(embedded_worker_id_);
|
| + if (context_ && process_id_ != -1) {
|
| + context_->wrapper()->process_manager()->ReleaseWorkerProcess(
|
| + embedded_worker_id_);
|
| + }
|
| registry_->RemoveWorker(process_id_, embedded_worker_id_);
|
| }
|
|
|
| @@ -116,7 +119,7 @@ void EmbeddedWorkerInstance::Start(int64 service_worker_version_id,
|
| params->script_url = script_url;
|
| params->worker_devtools_agent_route_id = MSG_ROUTING_NONE;
|
| params->pause_on_start = false;
|
| - context_->process_manager()->AllocateWorkerProcess(
|
| + context_->wrapper()->process_manager()->AllocateWorkerProcess(
|
| embedded_worker_id_,
|
| SortProcesses(possible_process_ids),
|
| script_url,
|
| @@ -189,7 +192,7 @@ void EmbeddedWorkerInstance::RunProcessAllocated(
|
| if (!instance) {
|
| if (status == SERVICE_WORKER_OK) {
|
| // We only have a process allocated if the status is OK.
|
| - context->process_manager()->ReleaseWorkerProcess(
|
| + context->wrapper()->process_manager()->ReleaseWorkerProcess(
|
| params->embedded_worker_id);
|
| }
|
| callback.Run(SERVICE_WORKER_ERROR_ABORT);
|
| @@ -253,8 +256,10 @@ void EmbeddedWorkerInstance::OnStarted(int thread_id) {
|
| 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(embedded_worker_id_);
|
| + if (context_) {
|
| + context_->wrapper()->process_manager()->ReleaseWorkerProcess(
|
| + embedded_worker_id_);
|
| + }
|
| status_ = STOPPED;
|
| process_id_ = -1;
|
| thread_id_ = -1;
|
|
|