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

This commit is contained in:
Catalin Badea 2015-09-30 10:14:33 -04:00
Родитель c537f8c503
Коммит 47e2f6ee5c
1 изменённых файлов: 3 добавлений и 1 удалений

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

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