Chromium Code Reviews| Index: content/browser/service_worker/service_worker_storage.cc |
| diff --git a/content/browser/service_worker/service_worker_storage.cc b/content/browser/service_worker/service_worker_storage.cc |
| index 62d198bd5aa6e6678b0a66b786222d9d77415c29..54866ce335bd5e6fe3672de28853f038f383c798 100644 |
| --- a/content/browser/service_worker/service_worker_storage.cc |
| +++ b/content/browser/service_worker/service_worker_storage.cc |
| @@ -580,11 +580,16 @@ void ServiceWorkerStorage::DidGetAllRegistrations( |
| info.script_url = it->script; |
| info.registration_id = it->registration_id; |
| info.active_version.is_null = false; |
| - if (it->is_active) |
| - info.active_version.status = ServiceWorkerVersion::ACTIVE; |
| - else |
| - info.active_version.status = ServiceWorkerVersion::INSTALLED; |
| - info.active_version.version_id = it->version_id; |
| + if (ServiceWorkerVersion* version = |
| + context_->GetLiveVersion(it->version_id)) { |
| + info.active_version = version->GetInfo(); |
|
nhiroki
2014/06/03 02:37:10
There might be a case that |version| hasn't been a
horo
2014/06/03 03:44:37
Done.
|
| + } else { |
| + if (it->is_active) |
| + info.active_version.status = ServiceWorkerVersion::ACTIVE; |
| + else |
| + info.active_version.status = ServiceWorkerVersion::INSTALLED; |
| + info.active_version.version_id = it->version_id; |
| + } |
| infos.push_back(info); |
| } |