| Index: content/child/service_worker/service_worker_network_provider.cc
|
| diff --git a/content/child/service_worker/service_worker_network_provider.cc b/content/child/service_worker/service_worker_network_provider.cc
|
| index ffac7fc35d06a88679b35621d00a05bae9302fce..82556e62939e90541ec655af0ec79f4950512e16 100644
|
| --- a/content/child/service_worker/service_worker_network_provider.cc
|
| +++ b/content/child/service_worker/service_worker_network_provider.cc
|
| @@ -15,6 +15,7 @@
|
| #include "content/common/service_worker/service_worker_utils.h"
|
| #include "content/public/common/browser_side_navigation_policy.h"
|
| #include "ipc/ipc_sync_channel.h"
|
| +#include "mojo/public/cpp/bindings/associated_group.h"
|
| #include "third_party/WebKit/public/platform/WebSecurityOrigin.h"
|
| #include "third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerNetworkProvider.h"
|
| #include "third_party/WebKit/public/web/WebLocalFrame.h"
|
| @@ -176,14 +177,21 @@ ServiceWorkerNetworkProvider::ServiceWorkerNetworkProvider(
|
| return;
|
| if (!ChildThreadImpl::current())
|
| return; // May be null in some tests.
|
| - ServiceWorkerProviderHostInfo provider_info(
|
| - provider_id_, route_id, provider_type, is_parent_frame_secure);
|
| +
|
| + ServiceWorkerProviderHostInfo host_info(provider_id_, route_id, provider_type,
|
| + is_parent_frame_secure);
|
| + host_info.host_request = mojo::MakeRequest(&provider_host_);
|
| + mojom::ServiceWorkerProviderAssociatedRequest client_request =
|
| + mojo::MakeRequest(&host_info.client_ptr_info);
|
| +
|
| + DCHECK(host_info.host_request.is_pending());
|
| + DCHECK(host_info.host_request.handle().is_valid());
|
| context_ = new ServiceWorkerProviderContext(
|
| - provider_id_, provider_type,
|
| + provider_id_, provider_type, std::move(client_request),
|
| ChildThreadImpl::current()->thread_safe_sender());
|
| ChildThreadImpl::current()->channel()->GetRemoteAssociatedInterface(
|
| &dispatcher_host_);
|
| - dispatcher_host_->OnProviderCreated(std::move(provider_info));
|
| + dispatcher_host_->OnProviderCreated(std::move(host_info));
|
| }
|
|
|
| ServiceWorkerNetworkProvider::ServiceWorkerNetworkProvider(
|
| @@ -203,7 +211,7 @@ ServiceWorkerNetworkProvider::~ServiceWorkerNetworkProvider() {
|
| return;
|
| if (!ChildThreadImpl::current())
|
| return; // May be null in some tests.
|
| - dispatcher_host_->OnProviderDestroyed(provider_id());
|
| + provider_host_.reset();
|
| }
|
|
|
| void ServiceWorkerNetworkProvider::SetServiceWorkerVersionId(
|
|
|