| Index: content/browser/service_worker/service_worker_provider_host.cc
|
| diff --git a/content/browser/service_worker/service_worker_provider_host.cc b/content/browser/service_worker/service_worker_provider_host.cc
|
| index 599047519bc3e313936a6e6c7b1b44f56bd9c907..1626c49085998635b21bbdae306ad0103cfd5e6f 100644
|
| --- a/content/browser/service_worker/service_worker_provider_host.cc
|
| +++ b/content/browser/service_worker/service_worker_provider_host.cc
|
| @@ -302,6 +302,24 @@ ServiceWorkerProviderHost::MatchRegistration() const {
|
| return nullptr;
|
| }
|
|
|
| +void ServiceWorkerProviderHost::CopyMatchingRegistrations() {
|
| + for (scoped_ptr<ServiceWorkerContextCore::ProviderHostIterator> it =
|
| + context_->GetProviderHostIterator();
|
| + !it->IsAtEnd(); it->Advance()) {
|
| + ServiceWorkerProviderHost* host = it->GetProviderHost();
|
| + if (host->render_process_id_ != render_process_id_ ||
|
| + host->render_frame_id_ != render_frame_id_ ||
|
| + host->document_url_ != document_url_)
|
| + continue;
|
| + // This is possible in some tests.
|
| + if (host == this)
|
| + continue;
|
| + for (auto& key_registration : host->matching_registrations_)
|
| + AddMatchingRegistration(key_registration.second.get());
|
| + break;
|
| + }
|
| +}
|
| +
|
| void ServiceWorkerProviderHost::NotifyControllerLost() {
|
| SetControllerVersionAttribute(nullptr, true /* notify_controllerchange */);
|
| }
|
|
|