Bug 1188545 - ServiceWorkerRegistrationInfo::Clear() should terminated workers. r=nsm

This commit is contained in:
Catalin Badea 2015-09-30 19:11:03 -04:00
Родитель 76c7d43fd9
Коммит c5f9033d16
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -328,8 +328,8 @@ void
ServiceWorkerRegistrationInfo::Clear()
{
if (mInstallingWorker) {
// FIXME(nsm): Terminate installing worker.
mInstallingWorker->UpdateState(ServiceWorkerState::Redundant);
mInstallingWorker->WorkerPrivate()->NoteDeadServiceWorkerInfo();
mInstallingWorker = nullptr;
// FIXME(nsm): Abort any inflight requests from installing worker.
}
@ -343,6 +343,7 @@ ServiceWorkerRegistrationInfo::Clear()
NS_WARNING("Failed to purge the waiting cache.");
}
mWaitingWorker->WorkerPrivate()->NoteDeadServiceWorkerInfo();
mWaitingWorker = nullptr;
}
@ -355,6 +356,7 @@ ServiceWorkerRegistrationInfo::Clear()
NS_WARNING("Failed to purge the active cache.");
}
mActiveWorker->WorkerPrivate()->NoteDeadServiceWorkerInfo();
mActiveWorker = nullptr;
}