| 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 d1e82aac54e748d217663ddfb4987b3b756821ad..09fe5e8ffcf7d192752ef7d1cf5abf7053a58e89 100644
|
| --- a/content/browser/service_worker/service_worker_provider_host.cc
|
| +++ b/content/browser/service_worker/service_worker_provider_host.cc
|
| @@ -82,7 +82,8 @@ ServiceWorkerProviderHost::ServiceWorkerProviderHost(
|
| parent_frame_security_level_(parent_frame_security_level),
|
| context_(context),
|
| dispatcher_host_(dispatcher_host),
|
| - allow_association_(true) {
|
| + allow_association_(true),
|
| + controller_was_deleted_(false) {
|
| DCHECK_NE(SERVICE_WORKER_PROVIDER_UNKNOWN, provider_type_);
|
|
|
| // PlzNavigate
|
| @@ -174,6 +175,9 @@ void ServiceWorkerProviderHost::OnSkippedWaiting(
|
| if (!controlling_version_)
|
| return;
|
| ServiceWorkerVersion* active_version = registration->active_version();
|
| + // TODO(falken): Change to DCHECK once https://crbug.com/655910 is
|
| + // resolved.
|
| + CHECK(active_version);
|
| DCHECK_EQ(active_version->status(), ServiceWorkerVersion::ACTIVATING);
|
| SetControllerVersionAttribute(active_version,
|
| true /* notify_controllerchange */);
|
| @@ -320,7 +324,9 @@ ServiceWorkerProviderHost::MatchRegistration() const {
|
| return nullptr;
|
| }
|
|
|
| -void ServiceWorkerProviderHost::NotifyControllerLost() {
|
| +void ServiceWorkerProviderHost::NotifyControllerLost(bool was_deleted) {
|
| + if (was_deleted)
|
| + controller_was_deleted_ = true;
|
| SetControllerVersionAttribute(nullptr, true /* notify_controllerchange */);
|
| }
|
|
|
| @@ -411,7 +417,8 @@ void ServiceWorkerProviderHost::AddScopedProcessReferenceToPattern(
|
|
|
| void ServiceWorkerProviderHost::ClaimedByRegistration(
|
| ServiceWorkerRegistration* registration) {
|
| - DCHECK(registration->active_version());
|
| + // TODO(falken): Change to DCHECK once https://crbug.com/655910 is resolved.
|
| + CHECK(registration->active_version());
|
| if (registration == associated_registration_) {
|
| SetControllerVersionAttribute(registration->active_version(),
|
| true /* notify_controllerchange */);
|
|
|