| Index: content/browser/service_worker/service_worker_dispatcher_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_dispatcher_host.cc b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| index a8b77c3f23a8c5708c356b801b63219be60a77ce..20615b6d1f67510c56f560b689276ed2982bb075 100644
|
| --- a/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| +++ b/content/browser/service_worker/service_worker_dispatcher_host.cc
|
| @@ -552,6 +552,22 @@ void ServiceWorkerDispatcherHost::OnSetHostedVersionId(
|
| return;
|
| if (!provider_host->SetHostedVersionId(version_id))
|
| BadMessageReceived();
|
| +
|
| + // Retrieve the registration associated with |version_id|.
|
| + ServiceWorkerVersion* version = GetContext()->GetLiveVersion(version_id);
|
| + if (!version)
|
| + return;
|
| + ServiceWorkerRegistration* registration =
|
| + GetContext()->GetLiveRegistration(version->registration_id());
|
| + DCHECK(registration);
|
| +
|
| + ServiceWorkerRegistrationObjectInfo info;
|
| + ServiceWorkerVersionAttributes attrs;
|
| + GetRegistrationObjectInfoAndVersionAttributes(
|
| + provider_host->AsWeakPtr(), registration, &info, &attrs);
|
| +
|
| + Send(new ServiceWorkerMsg_AssociateRegistrationWithServiceWorker(
|
| + kDocumentMainThreadId, provider_id, info, attrs));
|
| }
|
|
|
| ServiceWorkerRegistrationHandle*
|
|
|